Pb __clone method crash

From: Date: Thu, 20 Mar 2003 09:52:36 +0000
Subject: Pb __clone method crash
Groups: php.internals 
Request: Send a blank email to internals+get-123@lists.php.net to get a copy of this message
Hi, 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

« previous php.internals (#123) next »