ID: 32852 User updated by: cox at idecnet dot com Reported By: cox at idecnet dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.0.4 New Comment:
With php5-STABLE-200504271035: PHP 5.0.5-dev (cli) (built: Apr 27 2005 13:08:58) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies The bug is still there. Tomas V.V.Cox Previous Comments: ------------------------------------------------------------------------ [2005-04-27 12:52:31] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2005-04-27 12:44:58] cox at idecnet dot com Description: ------------ Crash with singleton() and __destruct(), see below. Tomas V.V.Cox Reproduce code: --------------- <?php class crashme { private static $instance = null; public function __construct() { self::$instance = $this; } public function __destruct() { echo "i'm called\n"; } public static function singleton() { if (!isset(self::$instance)) { self::$instance = new crashme(); } return self::$instance; } } crashme::singleton(); ?> Expected result: ---------------- i'm called Actual result: -------------- i'm called i'm called Segmentation fault (core dumped) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32852&edit=1