Bug #69756 [Ver->Csd]: Fatal error: Nesting level too deep - recursive dependency? with ===

From: Date: Fri, 05 Jun 2015 07:05:35 +0000
Subject: Bug #69756 [Ver->Csd]: Fatal error: Nesting level too deep - recursive dependency? with ===
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193133@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:         dmitry@php.net
 Reported by:        jbboehr at gmail dot com
 Summary:            Fatal error: Nesting level too deep - recursive
                     dependency? with ===
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Ubuntu 14.04
 PHP Version:        master-Git-2015-06-04 (Git)
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed5fbf5e49eab435cd7a0a9a5627698de92887c1
Log: Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency? with ===)


Previous Comments:
------------------------------------------------------------------------
[2015-06-05 06:21:09] laruence@php.net

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

------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#193133) next »