Edit report at http://bugs.php.net/bug.php?id=51533&edit=1

 ID:               51533
 User updated by:  neel dot basu dot z at gmail 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

 New Comment:

**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.


Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=51533&edit=1

Reply via email to