summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug75049.phpt
blob: cf1f80367c31cc150262d6ae98dbe5e229b93a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
--FILE--
<?php
class Auto { public static function loader() {}}
$autoloader = '\Auto::loader';

echo (int)spl_autoload_register($autoloader);
echo (int)spl_autoload_unregister($autoloader);
echo (int)spl_autoload_register($autoloader);
foreach (spl_autoload_functions() as $loader) {
    echo (int)spl_autoload_unregister($loader);
}
echo (int)count(spl_autoload_functions());
--EXPECT--
11110