mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
test script for bug #61697
This commit is contained in:
parent
f13288de96
commit
8238c6a4c8
26
ext/spl/tests/bug61697.phpt
Normal file
26
ext/spl/tests/bug61697.phpt
Normal file
@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
|
||||
--XFAIL--
|
||||
Bug #61697 not fixed yet
|
||||
--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(create_function('$class', 'echo "cf1: [[$class]]\n";'));
|
||||
spl_autoload_register(create_function('$class', 'echo "cf2: [[$class]]\n";'));
|
||||
|
||||
foreach (spl_autoload_functions() AS $func)
|
||||
{
|
||||
spl_autoload_unregister($func);
|
||||
}
|
||||
|
||||
print_r(spl_autoload_functions());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Array
|
||||
(
|
||||
)
|
Loading…
Reference in New Issue
Block a user