php-src/ext/spl/php_spl.stub.php
Nikita Popov 94df2f697f Fix bug #65006
The "callable name" may be the same for multiple distinct callables.
The code already worked around this for the case of instance methods,
but there are other cases in which callable names clash, such as
the use of self:: reported in the referenced bug.

Rather than trying to generate a unique name for callables, compare
the content of the alfi structures. This is less efficient if there
are many autoload functions, but autoload *registration* does not
need to be particularly efficient.

As a side-effect, this no longer permits unregistering non-callables.
2020-06-10 11:30:32 +02:00

33 lines
1.1 KiB
PHP
Executable file

<?php
/** @generate-function-entries */
function class_implements($what, bool $autoload = true): array|false {}
function class_parents($instance, bool $autoload = true): array|false {}
function class_uses($what, bool $autoload = true): array|false {}
function spl_autoload(string $class_name, ?string $file_extensions = null): void {}
function spl_autoload_call(string $class_name): void {}
function spl_autoload_extensions(?string $file_extensions = null): string {}
function spl_autoload_functions(): array {}
function spl_autoload_register(?callable $autoload_function = null, bool $throw = true, bool $prepend = false): bool {}
function spl_autoload_unregister(callable $autoload_function): bool {}
function spl_classes(): array {}
function spl_object_hash(object $obj): string {}
function spl_object_id(object $obj): int {}
function iterator_apply(Traversable $iterator, callable $function, ?array $args = null): int {}
function iterator_count(Traversable $iterator): int {}
function iterator_to_array(Traversable $iterator, bool $use_keys = true): array {}