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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
45 - 26 = ?
Subscribe to this entry?

 
 [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: Mon Apr 15 03:01:28 2024 UTC