diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2020-01-13 17:06:26 +0100 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2020-03-02 15:25:32 +0100 |
commit | 9e775db02567d3b90694ebb43f0225875a48e8c9 (patch) | |
tree | cd25ebdb5e735ca322eded189b156619a4b43534 /ext/reflection/php_reflection.c | |
parent | c06850b9fa1b6dc8f4f8a46d6d0ea55e8baf7cbf (diff) | |
download | php-git-9e775db02567d3b90694ebb43f0225875a48e8c9.tar.gz |
Define Stringable with __toString():string method
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 793cf5de2f..05a016b97c 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -6214,7 +6214,6 @@ static const zend_function_entry reflection_functions[] = { }; static const zend_function_entry reflector_functions[] = { - ZEND_ABSTRACT_ME(reflector, __toString, arginfo_class_Reflector___toString) PHP_FE_END }; @@ -6522,6 +6521,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ INIT_CLASS_ENTRY(_reflection_entry, "Reflector", reflector_functions); reflector_ptr = zend_register_internal_interface(&_reflection_entry); + zend_class_implements(reflector_ptr, 1, zend_ce_stringable); INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunctionAbstract", reflection_function_abstract_functions); reflection_init_class_handlers(&_reflection_entry); @@ -6550,6 +6550,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ reflection_init_class_handlers(&_reflection_entry); reflection_type_ptr = zend_register_internal_class(&_reflection_entry); reflection_type_ptr->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; + zend_class_implements(reflection_type_ptr, 1, zend_ce_stringable); INIT_CLASS_ENTRY(_reflection_entry, "ReflectionNamedType", reflection_named_type_functions); reflection_init_class_handlers(&_reflection_entry); |