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