php-src/Zend/tests/bug33116.phpt
2017-02-03 18:52:57 +01:00

22 lines
337 B
PHP

--TEST--
Bug #33116 (crash when assigning class name to global variable in __autoload)
--FILE--
<?php
spl_autoload_register(function ($class) {
$GLOBALS['include'][] = $class;
eval("class DefClass{}");
});
$a = new DefClass;
print_r($a);
print_r($GLOBALS['include']);
?>
--EXPECT--
DefClass Object
(
)
Array
(
[0] => DefClass
)