summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_autoload_010.phpt
blob: cd70bdccf0352133dda6c726c123f9837aa4dbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
SPL: spl_autoload() and prepend
--INI--
include_path=.
--FILE--
<?php
function autoloadA($name) {
    echo "A -> $name\n";
}
function autoloadB($name) {
    echo "B -> $name\n";
}
function autoloadC($name) {
    echo "C -> $name\n";
    class C{}
}

spl_autoload_register('autoloadA');
spl_autoload_register('autoloadB', true, true);
spl_autoload_register('autoloadC');

new C;
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
B -> C
A -> C
C -> C
===DONE===