diff options
| author | Andi Gutmans <andi@php.net> | 2001-12-26 20:17:34 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2001-12-26 20:17:34 +0000 |
| commit | 5cb454a8ad212f7d3ededc650466a087ffde2ffe (patch) | |
| tree | 10562e6e9ff689b42c730462e6d71604974fa264 /Zend/zend_objects.c | |
| parent | b04acdadf4064f5a788be0a33c124b87afa497b5 (diff) | |
| download | php-git-5cb454a8ad212f7d3ededc650466a087ffde2ffe.tar.gz | |
- Fix scoping issue. The following works now:
<?
class MyClass {
static $id = 0;
function MyClass()
{
$this->id = self::$id++;
}
function _clone()
{
$this->name = $clone->name;
$this->address = "New York";
$this->id = self::$id++;
}
}
$obj = new MyClass();
$obj->name = "Hello";
$obj->address = "Tel-Aviv";
print $obj->id;
print "\n";
$obj = $obj->_clone();
print $obj->id;
print "\n";
print $obj->name;
print "\n";
print $obj->address;
print "\n";
Diffstat (limited to 'Zend/zend_objects.c')
0 files changed, 0 insertions, 0 deletions
