1--TEST--
2Test get_declared_classes() function : testing autoloaded classes
3--FILE--
4<?php
5echo "*** Testing get_declared_classes() : testing autoloaded classes ***\n";
6
7spl_autoload_register(function ($class_name) {
8    require_once $class_name . '.inc';
9});
10
11echo "\n-- before instance is declared --\n";
12var_dump(in_array('AutoLoaded', get_declared_classes()));
13
14echo "\n-- after instance is declared --\n";
15$class = new AutoLoaded();
16var_dump(in_array('AutoLoaded', get_declared_classes()));
17
18echo "\nDONE\n";
19
20?>
21--EXPECT--
22*** Testing get_declared_classes() : testing autoloaded classes ***
23
24-- before instance is declared --
25bool(false)
26
27-- after instance is declared --
28bool(true)
29
30DONE
31