diff options
author | Xinchen Hui <laruence@php.net> | 2012-07-18 19:19:31 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-07-18 19:19:31 +0800 |
commit | 8238c6a4c815220045322ac3c524b98613639f97 (patch) | |
tree | e7a85734116c5780de373988902347b66365ccc1 /ext/spl | |
parent | f13288de96b9cc064b976a384fad73a191891721 (diff) | |
download | php-git-8238c6a4c815220045322ac3c524b98613639f97.tar.gz |
test script for bug #61697
Diffstat (limited to 'ext/spl')
-rw-r--r-- | ext/spl/tests/bug61697.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/spl/tests/bug61697.phpt b/ext/spl/tests/bug61697.phpt new file mode 100644 index 0000000000..d95caef978 --- /dev/null +++ b/ext/spl/tests/bug61697.phpt @@ -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 +( +) |