2019-06-18 17:33:07 +08:00
|
|
|
<?php
|
|
|
|
|
2021-02-13 06:33:09 +08:00
|
|
|
/** @generate-class-entries */
|
2020-04-21 18:23:21 +08:00
|
|
|
|
2022-06-21 15:28:57 +08:00
|
|
|
#[\AllowDynamicProperties]
|
2021-02-17 20:42:42 +08:00
|
|
|
class stdClass
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-08-17 05:35:16 +08:00
|
|
|
function exit(string|int $status = 0): never {}
|
2024-08-14 19:44:12 +08:00
|
|
|
|
|
|
|
/** @alias exit */
|
2024-08-17 05:35:16 +08:00
|
|
|
function die(string|int $status = 0): never {}
|
2024-08-14 19:44:12 +08:00
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/** @refcount 1 */
|
2019-06-18 17:33:07 +08:00
|
|
|
function zend_version(): string {}
|
|
|
|
|
|
|
|
function func_num_args(): int {}
|
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function func_get_arg(int $position): mixed {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/** @return array<int, mixed> */
|
2020-03-30 06:40:18 +08:00
|
|
|
function func_get_args(): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function strlen(string $string): int {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-12-20 22:27:06 +08:00
|
|
|
/** @compile-time-eval */
|
2020-07-12 18:40:37 +08:00
|
|
|
function strcmp(string $string1, string $string2): int {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-12-20 22:27:06 +08:00
|
|
|
/** @compile-time-eval */
|
2020-07-12 18:40:37 +08:00
|
|
|
function strncmp(string $string1, string $string2, int $length): int {}
|
2020-03-30 06:40:18 +08:00
|
|
|
|
2021-12-20 22:27:06 +08:00
|
|
|
/** @compile-time-eval */
|
2020-07-12 18:40:37 +08:00
|
|
|
function strcasecmp(string $string1, string $string2): int {}
|
2020-03-30 06:40:18 +08:00
|
|
|
|
2021-12-20 22:27:06 +08:00
|
|
|
/** @compile-time-eval */
|
2020-07-12 18:40:37 +08:00
|
|
|
function strncasecmp(string $string1, string $string2, int $length): int {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function error_reporting(?int $error_level = null): int {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-07-15 04:02:59 +08:00
|
|
|
function define(string $constant_name, mixed $value, bool $case_insensitive = false): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
|
|
|
function defined(string $constant_name): bool {}
|
|
|
|
|
2020-03-30 06:40:18 +08:00
|
|
|
function get_class(object $object = UNKNOWN): string {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-03-30 06:40:18 +08:00
|
|
|
function get_called_class(): string {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_parent_class(object|string $object_or_class = UNKNOWN): string|false {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
/** @param object|string $object_or_class */
|
|
|
|
function is_subclass_of(mixed $object_or_class, string $class, bool $allow_string = true): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
/** @param object|string $object_or_class */
|
|
|
|
function is_a(mixed $object_or_class, string $class, bool $allow_string = false): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-30 19:50:34 +08:00
|
|
|
/**
|
|
|
|
* @return array<string, mixed|ref>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-09-22 19:05:05 +08:00
|
|
|
function get_class_vars(string $class): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_object_vars(object $object): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_mangled_object_vars(object $object): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_class_methods(object|string $object_or_class): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
/** @param object|string $object_or_class */
|
2020-11-18 03:13:42 +08:00
|
|
|
function method_exists($object_or_class, string $method): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2024-02-07 00:02:00 +08:00
|
|
|
/**
|
|
|
|
* @param object|string $object_or_class
|
|
|
|
* @frameless-function {"arity": 2}
|
|
|
|
*/
|
2020-11-18 03:13:42 +08:00
|
|
|
function property_exists($object_or_class, string $property): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2024-02-07 00:02:00 +08:00
|
|
|
/**
|
|
|
|
* @frameless-function {"arity": 1}
|
|
|
|
* @frameless-function {"arity": 2}
|
|
|
|
*/
|
2020-07-12 18:40:37 +08:00
|
|
|
function class_exists(string $class, bool $autoload = true): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function interface_exists(string $interface, bool $autoload = true): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function trait_exists(string $trait, bool $autoload = true): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-06-11 05:10:18 +08:00
|
|
|
function enum_exists(string $enum, bool $autoload = true): bool {}
|
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function function_exists(string $function): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function class_alias(string $class, string $alias, bool $autoload = true): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_included_files(): array {}
|
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @alias get_included_files
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_required_files(): array {}
|
|
|
|
|
2024-01-18 00:15:55 +08:00
|
|
|
function trigger_error(string $message, int $error_level = E_USER_NOTICE): true {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
|
|
|
/** @alias trigger_error */
|
2024-01-18 00:15:55 +08:00
|
|
|
function user_error(string $message, int $error_level = E_USER_NOTICE): true {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-25 01:19:35 +08:00
|
|
|
/** @return callable|null */
|
2020-09-29 04:19:20 +08:00
|
|
|
function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2022-06-19 04:06:50 +08:00
|
|
|
function restore_error_handler(): true {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-25 01:19:35 +08:00
|
|
|
/** @return callable|null */
|
2020-09-29 04:19:20 +08:00
|
|
|
function set_exception_handler(?callable $callback) {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2022-06-19 04:06:50 +08:00
|
|
|
function restore_exception_handler(): true {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_declared_classes(): array {}
|
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_declared_traits(): array {}
|
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_declared_interfaces(): array {}
|
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<string, array>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
Completely remove disabled functions from function table
Currently, disabling a function only replaces the internal
function handler with one that throws a warning, and a few
places in the engine special-case such functions, such as
function_exists. This leaves us with a Schrödinger's function,
which both does not exist (function_exists returns false) and
does exist (you cannot define a function with the same name).
In particular, this prevents the implementation of robust
polyfills, as reported in https://bugs.php.net/bug.php?id=79382:
if (!function_exists('getallheaders')) {
function getallheaders(...) { ... }
}
If getallheaders() is a disabled function, this code will break.
This patch changes disable_functions to remove the functions from
the function table completely. For all intents and purposes, it
will look like the function does not exist.
This also renders two bits of PHP functionality obsolete and thus
deprecated:
* ReflectionFunction::isDisabled(), as it will no longer be
possible to construct the ReflectionFunction of a disabled
function in the first place.
* get_defined_functions() with $exclude_disabled=false, as
get_defined_functions() now never returns disabled functions.
Fixed bug #79382.
Closes GH-5473.
2020-04-27 19:17:37 +08:00
|
|
|
function get_defined_functions(bool $exclude_disabled = true): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-30 19:50:34 +08:00
|
|
|
/**
|
|
|
|
* @return array<string, mixed|ref>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-12-20 18:10:20 +08:00
|
|
|
function get_defined_vars(): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/**
|
|
|
|
* @param resource $resource
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_resource_type($resource): string {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
/** @param resource $resource */
|
|
|
|
function get_resource_id($resource): int {}
|
2020-04-21 18:31:17 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_resources(?string $type = null): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_loaded_extensions(bool $zend_extensions = false): array {}
|
|
|
|
|
2021-08-24 22:35:33 +08:00
|
|
|
/**
|
|
|
|
* @return array<string, mixed>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function get_defined_constants(bool $categorize = false): array {}
|
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, array>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2021-06-08 17:30:37 +08:00
|
|
|
function debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0): array {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-06-08 17:30:37 +08:00
|
|
|
function debug_print_backtrace(int $options = 0, int $limit = 0): void {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2020-07-12 18:40:37 +08:00
|
|
|
function extension_loaded(string $extension): bool {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
|
|
|
* @return array<int, string>|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-07-12 18:40:37 +08:00
|
|
|
function get_extension_funcs(string $extension): array|false {}
|
2019-06-18 17:33:07 +08:00
|
|
|
|
|
|
|
#if ZEND_DEBUG && defined(ZTS)
|
|
|
|
function zend_thread_id(): int {}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
function gc_mem_caches(): int {}
|
|
|
|
|
|
|
|
function gc_collect_cycles(): int {}
|
|
|
|
|
|
|
|
function gc_enabled(): bool {}
|
|
|
|
|
|
|
|
function gc_enable(): void {}
|
|
|
|
|
|
|
|
function gc_disable(): void {}
|
|
|
|
|
2021-08-25 00:57:17 +08:00
|
|
|
/**
|
2023-07-17 16:51:14 +08:00
|
|
|
* @return array<string, int|float|bool>
|
2021-08-25 00:57:17 +08:00
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-06-18 17:33:07 +08:00
|
|
|
function gc_status(): array {}
|