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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 07:00:01 2026 UTC