blob: 127de880aba27bc59499f9d0ed0b130cab58263f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--TEST--
ZE2 Autoload from destructor
--SKIPIF--
<?php
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
spl_autoload_register(function ($class_name) {
require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc');
echo 'autoload(' . $class_name . ")\n";
});
var_dump(interface_exists('autoload_interface', false));
var_dump(class_exists('autoload_implements', false));
$o = new Autoload_Implements;
var_dump($o);
var_dump($o instanceof autoload_interface);
unset($o);
var_dump(interface_exists('autoload_interface', false));
var_dump(class_exists('autoload_implements', false));
?>
===DONE===
--EXPECTF--
bool(false)
bool(false)
autoload(autoload_interface)
autoload(Autoload_Implements)
object(autoload_implements)#%d (0) {
}
bool(true)
bool(true)
bool(true)
===DONE===
|