php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22826 Segmentation fault when i do __clone
Submitted: 2003-03-22 10:04 UTC Modified: 2003-03-22 15:26 UTC
From: michielv at zeelandnet dot nl Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5CVS-2003-03-22 (dev) OS: Linux mdk 8.2
Private report: No CVE-ID: None
 [2003-03-22 10:04 UTC] 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#

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-22 15:26 UTC] moriyoshi@php.net
dupe of bug #22801. Please add further comments at that page.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 21:01:30 2024 UTC