Annotation of embedaddon/php/ext/spl/tests/spl_autoload_002.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: spl_autoload_functions()
3: --SKIPIF--
4: <?php
5: if (spl_autoload_functions() !== false) die('skip __autoload() registered by php.ini');
6: ?>
7: --FILE--
8: <?php
9:
10: function SplAutoloadTest1($name) {}
11: function SplAutoloadTest2($name) {}
12:
13: var_dump(spl_autoload_functions());
14:
15: spl_autoload_register();
16:
17: var_dump(spl_autoload_functions());
18:
19: spl_autoload_register('SplAutoloadTest1');
20: spl_autoload_register('SplAutoloadTest2');
21: spl_autoload_register('SplAutoloadTest1');
22:
23: var_dump(spl_autoload_functions());
24:
25: spl_autoload_unregister('SplAutoloadTest1');
26:
27: var_dump(spl_autoload_functions());
28:
29: spl_autoload_unregister('spl_autoload_call');
30:
31: var_dump(spl_autoload_functions());
32:
33: spl_autoload_register();
34:
35: var_dump(spl_autoload_functions());
36:
37: spl_autoload_unregister('spl_autoload');
38:
39: var_dump(spl_autoload_functions());
40:
41: ?>
42: ===DONE===
43: <?php exit(0); ?>
44: --EXPECT--
45: bool(false)
46: array(1) {
47: [0]=>
48: string(12) "spl_autoload"
49: }
50: array(3) {
51: [0]=>
52: string(12) "spl_autoload"
53: [1]=>
54: string(16) "SplAutoloadTest1"
55: [2]=>
56: string(16) "SplAutoloadTest2"
57: }
58: array(2) {
59: [0]=>
60: string(12) "spl_autoload"
61: [1]=>
62: string(16) "SplAutoloadTest2"
63: }
64: bool(false)
65: array(1) {
66: [0]=>
67: string(12) "spl_autoload"
68: }
69: bool(false)
70: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>