Doc #64528 [NEW]: ParentIterator doc refers to RecursiveIteratorIterator (wrong)

From: Date: Tue, 26 Mar 2013 21:38:34 +0000
Subject: Doc #64528 [NEW]: ParentIterator doc refers to RecursiveIteratorIterator (wrong)
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9697@lists.php.net to get a copy of this message
From: jon at langevin dot me Operating system: PHP version: 5.3.23 Package: Documentation problem Bug Type: Documentation Problem Bug description:ParentIterator doc refers to RecursiveIteratorIterator (wrong) Description: ------------ ParentIterator docs say that it can be used to iterate a RecursiveIteratorIterator, but that is incorrect, as ParentIterator is expecting RecursiveIterator or a child class. While it would make sense for ParentIterator to accept RecursiveIteratorIterator, that's not the case currently, so anyone trying to follow the documentation will get an error. The class signature for ParentIterator correctly shows that it accepts RecursiveIterator, but the doc does not support that. There is a comment on the doc page from a user showing code, using RecursiveIteratorIterator as an argument to ParentIterator (apparently it was successful for him?), which suggests this may actually work in a different version of PHP. Documentation error can be seen here: http://www.php.net/manual/en/class.parentiterator.php Test script: --------------- new \ParentIterator(new \RecursiveIteratorIterator(new \RecursiveIterator, \RecursiveIteratorIterator::CHILD_FIRST)); -- Edit bug report at https://bugs.php.net/bug.php?id=64528&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64528&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64528&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64528&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64528&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64528&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64528&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64528&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64528&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64528&r=support Expected behavior: https://bugs.php.net/fix.php?id=64528&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64528&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64528&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64528&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64528&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64528&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64528&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64528&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64528&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64528&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64528&r=mysqlcfg

« previous php.doc.bugs (#9697) next »