mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
a484b9a535
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.
23 lines
381 B
PHP
23 lines
381 B
PHP
--TEST--
|
|
Ensure that extending of undefined class throws the exception
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
class A extends B {}
|
|
} catch (Error $e) {
|
|
var_dump(class_exists('A'));
|
|
var_dump(class_exists('B'));
|
|
throw $e;
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
bool(false)
|
|
bool(false)
|
|
|
|
Fatal error: Uncaught Error: Class 'B' not found in %sbug75765.php:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %sbug75765.php on line %d
|