ID: 24746 Updated by: [EMAIL PROTECTED] Reported By: tim at sparkart dot com -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: Linux/FreeBSD PHP Version: 4.3.3RC1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Your object looks like this: object(a)#1 (1) { ["b"]=> object(b)#2 (1) { ["a"]=> &object(a)#1 (1) { ["b"]=> object(b)#2 (1) { ["a"]=> *RECURSION* } } } } Which should explain the error message you are seeing. Previous Comments: ------------------------------------------------------------------------ [2003-07-21 19:56:57] tim at sparkart dot com Description: ------------ The code (attached) produces the following error: Fatal error: Nesting level too deep - recursive dependency? in /home/tim/www/crash2.php on line 15 I started getting this bug with some code we are running and did some google searches and found something on the php-dev list (where the sample code is from) from 9/22/02: http://www.geocrawler.com/archives/3/5/2002/9/50/9731982/ This happens on our Linux and FreeBSD boxes running PHP 4.3.2, 4.3.1, and I just installed the latest CVS version (php4-STABLE-200307212330) and got the same error. For the CVS version I configured using "./configure" and ran it through the command line on a Red Hat 8 box. I saw other mentions of this error floating around but couldn't find anything recent so sorry if this is a repeat. Reproduce code: --------------- <?php class A { var $b; function A() { $this->b =& new B($this); } } class B { var $a; function B(&$a) { $this->a =& $a; } } $one =& new A; $two =& $one; if ($one == $two) { // <-- fatal error here echo "Same object\n"; } else { echo "not the same object\n"; } ?> Expected result: ---------------- Expected it to not give a fatal error. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24746&edit=1