Bug #67360 [NEW]: Missing element after ArrayObject::getIterator
| From: | im dot samuray at gmail dot com | Date: | Thu, 29 May 2014 16:54:59 +0000 |
| Subject: | Bug #67360 [NEW]: Missing element after ArrayObject::getIterator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185975@lists.php.net to get a copy of this message | ||
From: im dot samuray at gmail dot com
Operating system: debian 7
PHP version: 5.5.12
Package: Class/Object related
Bug Type: Bug
Bug description:Missing element after ArrayObject::getIterator
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
--
Edit bug report at https://bugs.php.net/bug.php?id=67360&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67360&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67360&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67360&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67360&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67360&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67360&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67360&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67360&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67360&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67360&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67360&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67360&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67360&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67360&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67360&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67360&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67360&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67360&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67360&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67360&r=mysqlcfg