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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michielv at zeelandnet dot nl
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC