1--TEST--
2Test get_declared_classes() function : testing autoloaded classes
3--FILE--
4<?php
5/* Prototype  : proto array get_declared_classes()
6 * Description: Returns an array of all declared classes.
7 * Source code: Zend/zend_builtin_functions.c
8 * Alias to functions:
9 */
10
11
12echo "*** Testing get_declared_classes() : testing autoloaded classes ***\n";
13
14spl_autoload_register(function ($class_name) {
15    require_once $class_name . '.inc';
16});
17
18echo "\n-- before instance is declared --\n";
19var_dump(in_array('AutoLoaded', get_declared_classes()));
20
21echo "\n-- after instance is declared --\n";
22$class = new AutoLoaded();
23var_dump(in_array('AutoLoaded', get_declared_classes()));
24
25echo "\nDONE\n";
26
27?>
28--EXPECTF--
29*** Testing get_declared_classes() : testing autoloaded classes ***
30
31-- before instance is declared --
32bool(false)
33
34-- after instance is declared --
35bool(true)
36
37DONE
38