]> granicus.if.org Git - php/commit
- Fix scoping issue. The following works now:
authorAndi Gutmans <andi@php.net>
Wed, 26 Dec 2001 20:17:34 +0000 (20:17 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 26 Dec 2001 20:17:34 +0000 (20:17 +0000)
commit5cb454a8ad212f7d3ededc650466a087ffde2ffe
tree10562e6e9ff689b42c730462e6d71604974fa264
parentb04acdadf4064f5a788be0a33c124b87afa497b5
- 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";
Zend/zend_execute.c
Zend/zend_execute_API.c