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
 [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: Fri Apr 26 04:01:30 2024 UTC