1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/ext/standard/tests/serialize/bug30234.phpt
T
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

38 lines
884 B
PHP

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