diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-06-29 22:49:15 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-06-29 22:49:15 +0200 |
commit | 813b6fc95050b32409014877e7dc9849c16717ee (patch) | |
tree | e1c6e0469f9742aff42070242b3e9085538f74f9 /Zend/zend_API.c | |
parent | 10b484e624e628e5f2255fab6252fc338ff114ad (diff) | |
download | php-git-813b6fc95050b32409014877e7dc9849c16717ee.tar.gz |
Add zend_read_static_property_ex API
For symmetry with zend_read_property_ex.
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index b643c5ffff..98312b3464 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4175,21 +4175,28 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const c } /* }}} */ -ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent) /* {{{ */ +ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, zend_bool silent) /* {{{ */ { zval *property; zend_class_entry *old_scope = EG(fake_scope); - zend_string *key = zend_string_init(name, name_length, 0); EG(fake_scope) = scope; - property = zend_std_get_static_property(scope, key, silent); + property = zend_std_get_static_property(scope, name, silent); EG(fake_scope) = old_scope; - zend_string_efree(key); return property; } /* }}} */ +ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent) /* {{{ */ +{ + zend_string *key = zend_string_init(name, name_length, 0); + zval *property = zend_std_get_static_property(scope, key, silent); + zend_string_efree(key); + return property; +} +/* }}} */ + ZEND_API void zend_save_error_handling(zend_error_handling *current) /* {{{ */ { current->handling = EG(error_handling); |