xref: /PHP-7.2/ext/spl/tests/spl_autoload_010.phpt (revision 0cfdd9a7)
1--TEST--
2SPL: spl_autoload() and prepend
3--INI--
4include_path=.
5--FILE--
6<?php
7function autoloadA($name) {
8    echo "A -> $name\n";
9}
10function autoloadB($name) {
11    echo "B -> $name\n";
12}
13function autoloadC($name) {
14    echo "C -> $name\n";
15    class C{}
16}
17
18spl_autoload_register('autoloadA');
19spl_autoload_register('autoloadB', true, true);
20spl_autoload_register('autoloadC');
21
22new C;
23?>
24===DONE===
25<?php exit(0); ?>
26--EXPECTF--
27B -> C
28A -> C
29C -> C
30===DONE===
31