diff --git a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt index 47813255381e4..9d12107050967 100644 --- a/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt +++ b/ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt @@ -15,6 +15,7 @@ foreach ($classNames as $className) { AssertionError Directory RoundingMode +SortDirection StreamBucket __PHP_Incomplete_Class php_user_filter diff --git a/ext/standard/array.c b/ext/standard/array.c index 3ee5afa70f8fa..b358e9cf36397 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -60,6 +60,7 @@ /* }}} */ ZEND_DECLARE_MODULE_GLOBALS(array) +PHPAPI zend_class_entry *sort_direction_ce; /* {{{ php_array_init_globals */ static void php_array_init_globals(zend_array_globals *array_globals) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index fbbeeb0b433f4..2b1beeceb46e3 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -297,6 +297,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */ assertion_error_ce = register_class_AssertionError(zend_ce_error); rounding_mode_ce = register_class_RoundingMode(); + sort_direction_ce = register_class_SortDirection(); BASIC_MINIT_SUBMODULE(var) BASIC_MINIT_SUBMODULE(file) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 6d0c565fc2d41..1f3d5617f8dfb 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -90,6 +90,11 @@ */ const SORT_FLAG_CASE = UNKNOWN; +enum SortDirection { + case Ascending; + case Descending; +} + /** * @var int * @cvalue PHP_CASE_LOWER diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index d0109fa27c960..991d76d91fc1c 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit basic_functions.stub.php instead. - * Stub hash: f5583557f058e4862750d1262296d7f59cb0eed0 + * Stub hash: 749c71a6220260eb3fb593b982a9d97821e0539b * Has decl header: yes */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) @@ -3980,6 +3980,17 @@ static void register_basic_functions_symbols(int module_number) attribute_Deprecated_const_ASSERT_EXCEPTION_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); } +static zend_class_entry *register_class_SortDirection(void) +{ + zend_class_entry *class_entry = zend_register_internal_enum("SortDirection", IS_UNDEF, NULL); + + zend_enum_add_case_cstr(class_entry, "Ascending", NULL); + + zend_enum_add_case_cstr(class_entry, "Descending", NULL); + + return class_entry; +} + static zend_class_entry *register_class___PHP_Incomplete_Class(void) { zend_class_entry ce, *class_entry; diff --git a/ext/standard/basic_functions_decl.h b/ext/standard/basic_functions_decl.h index 139b47f2444d4..fce41100fc79a 100644 --- a/ext/standard/basic_functions_decl.h +++ b/ext/standard/basic_functions_decl.h @@ -1,8 +1,13 @@ /* This is a generated file, edit basic_functions.stub.php instead. - * Stub hash: f5583557f058e4862750d1262296d7f59cb0eed0 */ + * Stub hash: 749c71a6220260eb3fb593b982a9d97821e0539b */ -#ifndef ZEND_BASIC_FUNCTIONS_DECL_f5583557f058e4862750d1262296d7f59cb0eed0_H -#define ZEND_BASIC_FUNCTIONS_DECL_f5583557f058e4862750d1262296d7f59cb0eed0_H +#ifndef ZEND_BASIC_FUNCTIONS_DECL_749c71a6220260eb3fb593b982a9d97821e0539b_H +#define ZEND_BASIC_FUNCTIONS_DECL_749c71a6220260eb3fb593b982a9d97821e0539b_H + +typedef enum zend_enum_SortDirection { + ZEND_ENUM_SortDirection_Ascending = 1, + ZEND_ENUM_SortDirection_Descending = 2, +} zend_enum_SortDirection; typedef enum zend_enum_RoundingMode { ZEND_ENUM_RoundingMode_HalfAwayFromZero = 1, @@ -15,4 +20,4 @@ typedef enum zend_enum_RoundingMode { ZEND_ENUM_RoundingMode_PositiveInfinity = 8, } zend_enum_RoundingMode; -#endif /* ZEND_BASIC_FUNCTIONS_DECL_f5583557f058e4862750d1262296d7f59cb0eed0_H */ +#endif /* ZEND_BASIC_FUNCTIONS_DECL_749c71a6220260eb3fb593b982a9d97821e0539b_H */ diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index 2205082e91dfd..a7eae0777d995 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -63,6 +63,8 @@ PHPAPI bool php_array_pick_keys(php_random_algo_with_state engine, zval *input, #define ARRAY_FILTER_USE_BOTH 1 #define ARRAY_FILTER_USE_KEY 2 +extern PHPAPI zend_class_entry *sort_direction_ce; + ZEND_BEGIN_MODULE_GLOBALS(array) bucket_compare_func_t *multisort_func; bool compare_deprecation_thrown;