php-src/Zend/tests/bug33116.phpt
Nikita Popov 0dfd918ee7 Remove support for __autoload()
There are probably some improvements we can do to the SPL
implementation now that __autoload() is gone. In particular having
EG(autoload_func) as a property zend function, rather than a simple
callback probably doesn't make sense.
2019-01-30 14:00:16 +01:00

22 lines
337 B
PHP

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