Bug #62171 [Csd->ReO]: "Nesting level too deep - recursive dependency?" in case of ===
Edit report at https://bugs.php.net/bug.php?id=62171&edit=1
ID: 62171
Updated by: cmb@php.net
Reported by: ray dot burgemeestre at gmail dot com
Summary: "Nesting level too deep - recursive dependency?" in
case of ===
-Status: Closed
+Status: Re-Opened
Type: Bug
Package: Scripting Engine problem
Operating System: linux
PHP Version: 5.4.3
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-04-02 14:21:09] ori at wikimedia dot org
I don't think this has been completely fixed. Test case:
<?php
$foo = [];
$foo[] = [ &$foo ];
array_search( $foo, $foo );
https://3v4l.org/3XMq5
------------------------------------------------------------------------
[2015-06-05 11:49:00] cmb@php.net
This issue has been fixed as of PHP 5.3.15 and 5.4.5, see
<http://3v4l.org/Y6ZKh>.
------------------------------------------------------------------------
[2013-06-08 09:58:38] marc-bennewitz at arcor dot de
I have the same issue in a logger method stringify all values into a readable format
(Zend\Log\Formatter\Base::normalize) which ever fail if the value contains a self referencing entry.
It's simply not possible to check this case so in will result in an infinite loop or we get the
fatal here described.
AND on logging using the error handler there is a $context argument containing such a self reference
:(
------------------------------------------------------------------------
[2012-06-03 21:40:25] ray dot burgemeestre at gmail dot com
Didn't see your reply, that sounds good Felipe.., will check it out tomorrow.. thanks.
------------------------------------------------------------------------
[2012-06-03 21:36:33] ray dot burgemeestre at gmail dot com
@carloschilazo of course removing the & fixes the error. You realize this is a bugreport right?
My point is that I think the === operator should still return true or false. In this case true as $a
and $a[0] are the same object.
My testcase was a little ambiguous, shiranai7's version is better: $a = array(); $a[0] =
&$a;.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62171
--
Edit this bug report at https://bugs.php.net/bug.php?id=62171&edit=1
Thread (10 messages)