xref: /PHP-7.4/tests/classes/autoload_014.phpt (revision 7af945e2)
1--TEST--
2Ensure the ReflectionMethod constructor triggers autoload.
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6  echo "In autoload: ";
7  var_dump($name);
8});
9
10try {
11  new ReflectionMethod("UndefC::test");
12}
13catch (ReflectionException $e) {
14  echo $e->getMessage();
15}
16?>
17--EXPECT--
18In autoload: string(6) "UndefC"
19Class UndefC does not exist
20