mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
25 lines
542 B
PHP
25 lines
542 B
PHP
--TEST--
|
|
Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
|
|
--FILE--
|
|
<?php
|
|
|
|
function f1($class) { echo "f1: [[$class]]\n"; }
|
|
function f2($class) { echo "f2: [[$class]]\n"; }
|
|
|
|
spl_autoload_register('f1');
|
|
spl_autoload_register('f2');
|
|
spl_autoload_register(function($class) { echo "cf1: [[$class]]\n"; });
|
|
spl_autoload_register(function($class) { echo "cf2: [[$class]]\n"; });
|
|
|
|
foreach (spl_autoload_functions() AS $func)
|
|
{
|
|
spl_autoload_unregister($func);
|
|
}
|
|
|
|
print_r(spl_autoload_functions());
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
)
|