|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-29 17:58 UTC] aharvey@php.net
-Status: Open
+Status: Closed
-Package: Class/Object related
+Package: SPL related
-Assigned To:
+Assigned To: aharvey
[2014-05-29 17:58 UTC] aharvey@php.net
[2014-05-29 17:59 UTC] aharvey@php.net
[2014-05-30 10:38 UTC] im dot samuray at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Description: ------------ Actually latest stable php i have is: PHP 5.5.10-1~dotdeb.1 (cli) (built: Mar 6 2014 18:55:59) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo Error ilustrated in test script (BTW: checked in hhvm 3.1 - works as expected) Test script: --------------- $array = array('' => 1, 1 => 2, 3 => 4); $ArrayObject = new ArrayObject($array); $Iterator = $ArrayObject->getIterator(); var_dump(count($Iterator) === count($array)); //outputs false, but must be true var_dump(iterator_to_array($Iterator)); //element '' => 1 is missing Expected result: ---------------- count($Iterator) === count($array) must be true Actual result: -------------- count($Iterator) === count($array) is false