summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-12-26 20:17:34 +0000
committerAndi Gutmans <andi@php.net>2001-12-26 20:17:34 +0000
commit5cb454a8ad212f7d3ededc650466a087ffde2ffe (patch)
tree10562e6e9ff689b42c730462e6d71604974fa264 /Zend/zend_objects.c
parentb04acdadf4064f5a788be0a33c124b87afa497b5 (diff)
downloadphp-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