Doc #60588 [NEW]: MultipleIterator::current return type not documented properly
| From: | crmalibu at gmail dot com | Date: | Wed, 21 Dec 2011 18:15:27 +0000 |
| Subject: | Doc #60588 [NEW]: MultipleIterator::current return type not documented properly | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-7696@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: 5.4.0RC3
Package: SPL related
Bug Type: Documentation Problem
Bug description:MultipleIterator::current return type not documented properly
Description:
------------
---
From manual page:
http://www.php.net/multipleiterator.current#refsect1-multipleiterator.current-returnvalues
---
The return type is said to be an array of Iterators. The return type is an
array of the current values of each of the Iterators.
also, method signature is wrong. It says return type is void, but return
type is array|false
public void MultipleIterator::current ( void )
Test script:
---------------
<?php
$iter = new MultipleIterator();
$iter->attachIterator(new ArrayIterator(range(5,6)));
$iter->rewind();
var_dump($iter->current());
Expected result:
----------------
something like
array(1) {
[0]=>
object(ArrayIterator)#3 (1) {
["storage":"ArrayIterator":private]=>
array(2) {
[0]=>
int(5)
[1]=>
int(6)
}
}
}
Actual result:
--------------
array(1) {
[0]=>
int(5)
}
--
Edit bug report at https://bugs.php.net/bug.php?id=60588&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60588&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60588&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60588&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60588&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60588&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60588&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60588&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60588&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60588&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60588&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60588&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60588&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60588&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60588&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60588&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60588&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60588&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60588&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60588&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60588&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60588&r=mysqlcfg