#22826 [Opn->Bgs]: Segmentation fault when i do __clone
| From: | moriyoshi@php.net | Date: | Sat, 22 Mar 2003 21:26:46 +0000 |
| Subject: | #22826 [Opn->Bgs]: Segmentation fault when i do __clone | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36191@lists.php.net to get a copy of this message | ||
ID: 22826
Updated by: moriyoshi@php.net
Reported By: michielv at zeelandnet dot nl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Linux mdk 8.2
PHP Version: 5CVS-2003-03-22 (dev)
New Comment:
dupe of bug #22801. Please add further comments at that page.
Previous Comments:
------------------------------------------------------------------------
[2003-03-22 10:04:49] michielv at zeelandnet dot nl
I get the seg fault with this code:
root@michielv.ath.cx /home/michiel/extra/1/php5/install# ./bin/php -r
'
class MyCloneable
{
static $id=0;
function MyCloneable ()
{
$this->id = self::$id++;
}
function __clone ()
{
$this->name = $that->name;
$this->address = "New York";
$this->id = self::$id++;
}
}
$obj = new MyCloneable();
$obj->name = "Hello";
$obj->address = "Tel-Aviv";
$obj = $obj->__clone();
'
Segmentation fault
root@michielv.ath.cx /home/michiel/extra/1/php5/install#
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22826&edit=1