|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2015-06-04 06:59 UTC] jbboehr at gmail dot com
 Description: ------------ The script below causes a fatal error on git master. Currently works as expected on PHP 5.3 - 5.6. Perhaps related to https://bugs.php.net/bug.php?id=62171 Test script: --------------- <?php $arr = new \ArrayObject(array('a')); foreach( $arr as $item ); var_dump($arr->getArrayCopy() === array('a')); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 00:00:01 2025 UTC | 
An more simpler reproduce case is: <?php $arr = range(1, 2); foreach($arr as &$item ) { var_dump($arr === array(1, 2)); } ?> and a recommend fix is here: http://pastebin.com/1CkVLeaC