summaryrefslogtreecommitdiff
path: root/ext/standard/tests/serialize/bug30234.phpt
blob: 4b45d8d1ef84c2ab43c0e454a7b2feabc8ffd451 (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
--TEST--
Bug #30234 (__autoload() not invoked for interfaces)
--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(__DIR__ . '/' . strtolower($class_name) . '.inc');
	echo __FUNCTION__ . '(' . $class_name . ")\n";
});

var_dump(interface_exists('autoload_interface', false));
var_dump(class_exists('autoload_implements', false));

$o = unserialize('O:19:"Autoload_Implements":0:{}');

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));

?>
--EXPECTF--
bool(false)
bool(false)
{closure}(autoload_interface)
{closure}(Autoload_Implements)
object(autoload_implements)#%d (0) {
}
bool(true)
bool(true)
bool(true)