php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69310 Misleading example comment
Submitted: 2015-03-26 15:58 UTC Modified: 2015-12-18 21:40 UTC
From: cmb@php.net Assigned: tpunt (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 - 8 = ?
Subscribe to this entry?

 
 [2015-03-26 15:58 UTC] cmb@php.net
Description:
------------
---
From manual page: http://www.php.net/language.oop5.typehinting
---
    /**
     * First parameter must be iterator
     */
    public function test_interface(Traversable $iterator) {
        echo get_class($iterator);
    }

The comment in the example is slightly imprecise, what is a particular problem
for the German translation, for example (en. iterator = ge. Iterator). I suggest
to reword:

  "First parameter must be a Traversable"



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-18 21:39 UTC] tpunt@php.net
-Assigned To: +Assigned To: tpunt
 [2015-12-18 21:40 UTC] tpunt@php.net
This example seems to no longer exist in the documentation.
 [2015-12-18 21:40 UTC] tpunt@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 08:01:30 2024 UTC