Bug #69756 [Ver]: Fatal error: Nesting level too deep - recursive dependency? with ===
| From: | laruence@php.net | Date: | Fri, 05 Jun 2015 06:21:09 +0000 |
| Subject: | Bug #69756 [Ver]: Fatal error: Nesting level too deep - recursive dependency? with === | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193131@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69756&edit=1
ID: 69756
Updated by: laruence@php.net
Reported by: jbboehr at gmail dot com
Summary: Fatal error: Nesting level too deep - recursive
dependency? with ===
Status: Verified
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu 14.04
PHP Version: master-Git-2015-06-04 (Git)
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2015-06-04 12:07:08] cmb@php.net
Verified: <http://3v4l.org/cRLAq>.
------------------------------------------------------------------------
[2015-06-04 06:59:22] 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'));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69756&edit=1