From: fabrice dot lecoz at zedesk dot com Operating system: win XP PHP version: 5CVS-2003-03-20 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: pb with __clone()
return of the __clone() method crash. <?php class test { var $name; function __construct($name) { $this->name = $name; } function __clone() { echo "cloning ...\n"; $this->name = "test ".$that->name; } } $test = new test("essai"); $test1 = $test; $test2 = $test->__clone(); $test1->name = "arthur"; echo "test : $test->name\n"; echo "test2 : $test2->name\n"; ?> -- expect -- cloning ... test : arthur test2 : test essai -- result -- cloning ... php crash AppName: php.exe AppVer: 5.0.0.0 ModName: php4ts.dll ModVer: 5.0.0.0 Offset: 000ee8a5 -- Edit bug report at http://bugs.php.net/?id=22801&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22801&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22801&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22801&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22801&r=support Expected behavior: http://bugs.php.net/fix.php?id=22801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22801&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22801&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22801&r=gnused