From: vituko at gmail dot com Operating system: Lenny PHP version: 5.2.6 PHP Bug Type: Class/Object related Bug description: Memory behavior that reminds ie memory leak.
Description: ------------ Garbage collection works in an unexpected way for me, when there're crossed references. I discovered it working with large databases, Apache crashes sometimes : the thread hangs and after /etc/init.d/apache2 restart, it continues working. Another thing : the only way to get track of references is debug_zval_dump (of course it can be done manually) and huge strings must be parsed. Further, when mixing true (&) and "php" references it's no more possible... or is it? Only a tought... Thanks Reproduce code: --------------- class a { public function __destruct() { echo 'destr<br>' ; } } $a = new a ; $a -> v = new a ; $a -> w = new a ; $a -> v -> w = $a -> w ; $a -> w -> v = $a -> v ; unset ($a) ; echo 'fin<br>' ; exit ; Expected result: ---------------- destr destr destr fin Actual result: -------------- destr fin destr destr -- Edit bug report at http://bugs.php.net/?id=45225&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45225&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45225&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45225&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45225&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45225&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45225&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45225&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45225&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45225&r=support Expected behavior: http://bugs.php.net/fix.php?id=45225&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45225&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45225&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45225&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45225&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45225&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45225&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45225&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45225&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45225&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45225&r=mysqlcfg