1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/Zend/tests/bug26697.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
444 B
PHP

--TEST--
Bug #26697 (calling class_exists on a nonexistent class in autoloader results in segfault)
--FILE--
<?php
spl_autoload_register(function ($name) {
echo __METHOD__ . "($name)\n";
var_dump(class_exists('NotExistingClass'));
echo __METHOD__ . "($name), done\n";
});
var_dump(class_exists('NotExistingClass'));
?>
===DONE===
--EXPECT--
{closure}(NotExistingClass)
bool(false)
{closure}(NotExistingClass), done
bool(false)
===DONE===