1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/tests/classes/autoload_011.phpt
timurib a484b9a535 Fix #75765 Exception on extend of undefined class
As the parent class is fetched prior to binding, there are no
safety concerns in this case and we can replace the fatal error
with an Error exception.
2018-01-12 18:41:39 +01:00

21 lines
363 B
PHP

--TEST--
Ensure extends does trigger autoload.
--FILE--
<?php
spl_autoload_register(function ($name) {
echo "In autoload: ";
var_dump($name);
});
class C extends UndefBase
{
}
?>
--EXPECTF--
In autoload: string(9) "UndefBase"
Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d
Stack trace:
#0 {main}
thrown in %sautoload_011.php on line %d