Edit report at https://bugs.php.net/bug.php?id=51533&edit=1
ID: 51533
Comment by: trefighter2334 at aol dot com
Reported by: neel dot basu dot z at gmail dot com
Summary: [recursive reference In Array] Nesting level too
deep
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Linux
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
Any word on this? I'm also experiencing this bug in both Ubuntu (Zend Server
AND
vanilla PHP) and Windows 7 (Zend Server).
I guess I'm off to go find some hackish way to detect array recursion.
Previous Comments:
------------------------------------------------------------------------
[2010-04-11 19:38:45] neel dot basu dot z at gmail dot com
**If It is not a Bug then Recursive Reference Detection is IMPOSSIBLE in PHP.
cause spl_object_hash() doesn't work on array or scaler types.
------------------------------------------------------------------------
[2010-04-11 19:35:59] neel dot basu dot z at gmail dot com
Description:
------------
When there is recursive reference in an array comparison yields Fatal Error.
Both == and === operators yields the same.
//-------
If It is not a Bug then Recursion Detection is IMPOSSIBLE in PHP.
cause spl_object_hash() doesn't work on array or scaler types.
Test script:
---------------
<?php
error_reporting(255);
ini_set('display_errors','On');
header('Content-Type: text/plain');
$a = array();
$a[0] = &$a;
var_dump($a === $a[0]);
var_dump($a == $a[0]);
?>
Expected result:
----------------
boolean true or false
Actual result:
--------------
Fatal error: Nesting level too deep - recursive dependency? in
/Server/http/php-bugs/nesting.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51533&edit=1