summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-02-21 11:50:44 +0000
committerAndi Gutmans <andi@php.net>2002-02-21 11:50:44 +0000
commit00e90f2ff3053a0cca50514bd17a036af5b5dac5 (patch)
tree46d7374f8d267b63e2dbc468e7aa81e29ddce957 /Zend/zend_API.c
parent15daf9928819f213c331c8fd6fe4412be703b8bd (diff)
downloadphp-git-00e90f2ff3053a0cca50514bd17a036af5b5dac5.tar.gz
- Experimental support for private members.
<? class MyClass { private $Hello = "Hello, World!\n"; function printHello() { print $this->Hello; } } class MyClass2 extends MyClass { function printHello() { MyClass::printHello(); /* Should print */ print $this->Hello; /* Shouldn't print out anything */ } } $obj = new MyClass(); print $obj->Hello; /* Shouldn't print out anything */ $obj->printHello(); /* Should print */ $obj = new MyClass2(); print $obj->Hello; /* Shouldn't print out anything */ $obj->printHello(); ?>
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index f6121a8cd3..7e03e22d4f 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1224,6 +1224,7 @@ ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_
*class_entry->refcount = 1;
class_entry->constants_updated = 0;
zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
+ zend_hash_init(&class_entry->private_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
class_entry->static_members = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(class_entry->static_members, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&class_entry->constants_table, 0, NULL, ZVAL_PTR_DTOR, 1);