diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-04-06 11:02:13 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-04-08 18:37:51 +0200 |
commit | 3709e74b5e495e210ada8039ed81fafa9cbadcdb (patch) | |
tree | b7347572b1e22a2a27a45260b4f4773bf916b158 /ext/spl/php_spl_arginfo.h | |
parent | b0d8f012f95ba1f2d8dba238c93baf3afb73b78e (diff) | |
download | php-git-3709e74b5e495e210ada8039ed81fafa9cbadcdb.tar.gz |
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Diffstat (limited to 'ext/spl/php_spl_arginfo.h')
-rw-r--r-- | ext/spl/php_spl_arginfo.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/spl/php_spl_arginfo.h b/ext/spl/php_spl_arginfo.h index cc60ff97ba..8dbb9c4d84 100644 --- a/ext/spl/php_spl_arginfo.h +++ b/ext/spl/php_spl_arginfo.h @@ -2,12 +2,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_implements, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, what) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_parents, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_INFO(0, instance) - ZEND_ARG_TYPE_INFO(0, autoload, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_class_uses arginfo_class_implements @@ -29,9 +29,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_spl_autoload_functions, 0, 0, MA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_register, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO(0, autoload_function) - ZEND_ARG_TYPE_INFO(0, throw, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, prepend, _IS_BOOL, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, autoload_function, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, throw, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prepend, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_unregister, 0, 1, _IS_BOOL, 0) @@ -52,7 +52,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_apply, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_count, 0, 1, IS_LONG, 0) @@ -61,5 +61,5 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_to_array, 0, 1, IS_ARRAY, 0) ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) - ZEND_ARG_TYPE_INFO(0, use_keys, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_keys, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() |