dis-bench / src /php /php-src /Zend /tests /autoload /bug33116.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
337 Bytes
--TEST--
Bug #33116 (crash when assigning class name to global variable in autoloader)
--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
)