diff options
author | Andi Gutmans <andi@php.net> | 2001-11-25 08:49:09 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-11-25 08:49:09 +0000 |
commit | d2da63f629632c8d7940566a71be66c952b17583 (patch) | |
tree | 3fa3f90f76000024b585e278098192f99bbe0421 /Zend/zend.c | |
parent | 3d741d71c6678ec68e82557d79ebefb6564d0ffd (diff) | |
download | php-git-d2da63f629632c8d7940566a71be66c952b17583.tar.gz |
- Support static members. The following script works:
<?
class foo
{
class bar
{
function init_values()
{
for ($i=1; $i<10; $i++) {
foo::bar::$hello[$i] = $i*$i;
}
}
function print_values()
{
for ($i=1; $i<10; $i++) {
print foo::bar::$hello[$i] . "\n";
}
}
}
}
foo::bar::init_values();
foo::bar::print_values();
for ($i=1; $i<10; $i++) {
print $hello[$i]?"Shouldn't be printed\n":"";
}
?>
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index a1563cd0fa..e7987873fc 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -251,6 +251,7 @@ static void register_standard_class(void) zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length); zend_standard_class_def.parent = NULL; zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0); + zend_hash_init_ex(&zend_standard_class_def.static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0); zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0); zend_standard_class_def.constructor = NULL; zend_standard_class_def.handle_function_call = NULL; |