From: Nikita Popov Date: Thu, 9 Apr 2020 14:47:39 +0000 (+0200) Subject: Mark spl_autoload_register function arg as UNKNOWN X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c10f30fdf9d7b7e03523e7266b2f0a5fc07595d9;p=php Mark spl_autoload_register function arg as UNKNOWN Not passing any parameters to this function has magic behavior. --- diff --git a/ext/spl/php_spl.stub.php b/ext/spl/php_spl.stub.php index b9c5335b70..1ff967358e 100755 --- a/ext/spl/php_spl.stub.php +++ b/ext/spl/php_spl.stub.php @@ -15,7 +15,7 @@ function spl_autoload_extensions(string $file_extensions = UNKNOWN): string {} function spl_autoload_functions(): array|false {} -function spl_autoload_register($autoload_function = null, bool $throw = true, bool $prepend = false): bool {} +function spl_autoload_register($autoload_function = UNKNOWN, bool $throw = true, bool $prepend = false): bool {} function spl_autoload_unregister($autoload_function): bool {} diff --git a/ext/spl/php_spl_arginfo.h b/ext/spl/php_spl_arginfo.h index 8dbb9c4d84..29e813b551 100644 --- a/ext/spl/php_spl_arginfo.h +++ b/ext/spl/php_spl_arginfo.h @@ -29,7 +29,7 @@ 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_WITH_DEFAULT_VALUE(0, autoload_function, "null") + ZEND_ARG_INFO(0, autoload_function) 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()