diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index 76628104528fe..e2b23a43039c7 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -6,8 +6,6 @@ static const func_info_t func_infos[] = { F1("get_class_vars", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF), F1("get_class_methods", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), F1("get_included_files", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), - FN("set_error_handler", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_OBJECT|MAY_BE_NULL), - FN("set_exception_handler", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_OBJECT|MAY_BE_NULL), F1("get_declared_classes", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), F1("get_declared_traits", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), F1("get_declared_interfaces", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index b92b80b917c54..01e396961645c 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -65,14 +65,12 @@ function get_mangled_object_vars(object $object): array {} */ function get_class_methods(object|string $object_or_class): array {} -/** @param object|string $object_or_class */ -function method_exists($object_or_class, string $method): bool {} +function method_exists(object|string $object_or_class, string $method): bool {} /** - * @param object|string $object_or_class * @frameless-function {"arity": 2} */ -function property_exists($object_or_class, string $property): bool {} +function property_exists(object|string $object_or_class, string $property): bool {} /** * @frameless-function {"arity": 1} @@ -107,13 +105,11 @@ function trigger_error(string $message, int $error_level = E_USER_NOTICE): true /** @alias trigger_error */ function user_error(string $message, int $error_level = E_USER_NOTICE): true {} -/** @return callable|null */ -function set_error_handler(?callable $callback, int $error_levels = E_ALL) {} +function set_error_handler(?callable $callback, int $error_levels = E_ALL): ?callable {} function restore_error_handler(): true {} -/** @return callable|null */ -function set_exception_handler(?callable $callback) {} +function set_exception_handler(?callable $callback): ?callable {} function restore_exception_handler(): true {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 20e6f0f9b48a3..481a6dce9b5aa 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c3bec3b17079456ef17e5c992995dcfbe62c6fe0 */ + * Stub hash: 79be594589d15cbfb9baf5ebed4691c5eb2044e7 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -84,12 +84,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_class_methods, 0, 1, IS_ARRA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_method_exists, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, object_or_class) + ZEND_ARG_TYPE_MASK(0, object_or_class, MAY_BE_OBJECT|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_property_exists, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, object_or_class) + ZEND_ARG_TYPE_MASK(0, object_or_class, MAY_BE_OBJECT|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, property, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -134,7 +134,7 @@ ZEND_END_ARG_INFO() #define arginfo_user_error arginfo_trigger_error -ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_error_handler, 0, 1, IS_CALLABLE, 1) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_levels, IS_LONG, 0, "E_ALL") ZEND_END_ARG_INFO() @@ -142,7 +142,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, IS_TRUE, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_exception_handler, 0, 1, IS_CALLABLE, 1) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1) ZEND_END_ARG_INFO()