Doc #60588 [Asn]: MultipleIterator::current return type not documented properly
| From: | levim@php.net | Date: | Fri, 16 Nov 2012 19:03:01 +0000 |
| Subject: | Doc #60588 [Asn]: MultipleIterator::current return type not documented properly | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9170@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60588&edit=1
ID: 60588
Updated by: levim@php.net
Reported by: crmalibu at gmail dot com
Summary: MultipleIterator::current return type not documented
properly
Status: Assigned
Type: Documentation Problem
Package: SPL related
PHP Version: 5.4.0RC3
-Assigned To: salathe
+Assigned To: levim
Block user comment: N
Private report: N
New Comment:
This has been partially updated. I'll confirm that the remainder is true and
finish this ticket.
Thank you for your report!
Previous Comments:
------------------------------------------------------------------------
[2011-12-21 18:15:27] crmalibu at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=60588&edit=1