xref: /PHP-8.2/tests/classes/bug75765.phpt (revision d30cd7d7)
1--TEST--
2Ensure that extending of undefined class throws the exception
3--FILE--
4<?php
5
6try {
7    class A extends B {}
8} catch (Error $e) {
9    var_dump(class_exists('A'));
10    var_dump(class_exists('B'));
11    throw $e;
12}
13
14?>
15--EXPECTF--
16bool(false)
17bool(false)
18
19Fatal error: Uncaught Error: Class "B" not found in %s:%d
20Stack trace:
21#0 {main}
22  thrown in %s on line %d
23