Doc #60588 [Asn->Csd]: MultipleIterator::current return type not documented properly
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
+Status: Closed
Type: Documentation Problem
Package: SPL related
PHP Version: 5.4.0RC3
Assigned To: levim
Block user comment: N
Private report: N
New Comment:
This has been fixed. It may take a week to propagate to the documentation mirrors.
Previous Comments:
------------------------------------------------------------------------
[2012-12-09 01:10:32] levim@php.net
Automatic comment from SVN on behalf of levim
Revision: http://svn.php.net/viewvc/?view=revision&revision=328714
Log: Updated return information to match its current implementation. See bug report #60588.
------------------------------------------------------------------------
[2012-11-16 19:03:40] levim@php.net
This has partially been updated. I'll review this report soon and finish the
changes as needed.
Thank you for your report!
------------------------------------------------------------------------
[2012-11-16 19:03:01] levim@php.net
This has been partially updated. I'll confirm that the remainder is true and
finish this ticket.
Thank you for your report!
------------------------------------------------------------------------
[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
Thread (5 messages)