xref: /PHP-7.2/tests/classes/autoload_004.phpt (revision 17ccbeec)
1--TEST--
2ZE2 Autoload and recursion
3--SKIPIF--
4<?php
5	if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
6?>
7--FILE--
8<?php
9
10spl_autoload_register(function ($class_name) {
11	var_dump(class_exists($class_name));
12	require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
13	echo 'autoload(' . $class_name . ")\n";
14});
15
16var_dump(class_exists('autoload_derived'));
17
18?>
19===DONE===
20--EXPECT--
21bool(false)
22bool(false)
23autoload(autoload_root)
24autoload(autoload_derived)
25bool(true)
26===DONE===
27