xref: /PHP-8.1/tests/classes/autoload_011.phpt (revision d30cd7d7)
1--TEST--
2Ensure extends does trigger autoload.
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6  echo "In autoload: ";
7  var_dump($name);
8});
9
10class C extends UndefBase
11{
12}
13?>
14--EXPECTF--
15In autoload: string(9) "UndefBase"
16
17Fatal error: Uncaught Error: Class "UndefBase" not found in %s:%d
18Stack trace:
19#0 {main}
20  thrown in %s on line %d
21