From: tim at sparkart dot com Operating system: Linux/FreeBSD PHP version: 4.3.3RC1 PHP Bug Type: Reproducible crash Bug description: Fatal error: Nesting level too deep - recursive dependency?
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 bug report at http://bugs.php.net/?id=24746&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24746&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24746&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24746&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24746&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24746&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24746&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24746&r=support Expected behavior: http://bugs.php.net/fix.php?id=24746&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24746&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24746&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24746&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24746&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24746&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24746&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24746&r=gnused