xref: /PHP-8.2/ext/spl/tests/bug61697.phpt (revision ded3d984)
1--TEST--
2Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
3--FILE--
4<?php
5
6function f1($class) { echo "f1: [[$class]]\n"; }
7function f2($class) { echo "f2: [[$class]]\n"; }
8
9spl_autoload_register('f1');
10spl_autoload_register('f2');
11spl_autoload_register(function($class) { echo "cf1: [[$class]]\n"; });
12spl_autoload_register(function($class) { echo "cf2: [[$class]]\n"; });
13
14foreach (spl_autoload_functions() AS $func)
15{
16    spl_autoload_unregister($func);
17}
18
19print_r(spl_autoload_functions());
20?>
21--EXPECT--
22Array
23(
24)
25