Doc #51814 [Opn->Csd]: ArrayIterator::append arguments are listed incorrectly
| From: | degeberg@php.net | Date: | Fri, 14 May 2010 07:18:18 +0000 |
| Subject: | Doc #51814 [Opn->Csd]: ArrayIterator::append arguments are listed incorrectly | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4369@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51814&edit=1
ID: 51814
Updated by: degeberg@php.net
Reported by: jarett dot millard at gmail dot com
Summary: ArrayIterator::append arguments are listed incorrectly
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: 5.3.2
-Assigned To:
+Assigned To: degeberg
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-05-14 09:18:10] degeberg@php.net
Automatic comment from SVN on behalf of degeberg
Revision: http://svn.php.net/viewvc/?view=revision&revision=299367
Log: Fixed PHP bug #51814 (ArrayIterator::append arguments are listed
incorrectly)
------------------------------------------------------------------------
[2010-05-13 22:08:31] jarett dot millard at gmail dot com
Description:
------------
The sole argument for the ArrayIterator::append method is listed as a
string; however, I have successfully used this method to add arbitrary
objects to an ArrayIterator.
Test script:
---------------
<?php
$ai=new ArrayIterator();
$obj=new stdClass;
$obj->a=1;
$ai->append($obj);
echo 'count() == '. $ai->count() .'<br />';
while($ai->valid())
{
echo 'Object '.$ai->key() .'->a == '.
$ai->current()->a.'<br />';
$ai->next();
}
?>
Expected result:
----------------
count() == 1
Object 0->a == 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51814&edit=1