xref: /PHP-8.4/tests/classes/autoload_016.phpt (revision d30cd7d7)
1--TEST--
2Ensure ReflectionClass::getProperty() triggers autoload
3--FILE--
4<?php
5spl_autoload_register(function ($name) {
6  echo "In autoload: ";
7  var_dump($name);
8});
9
10$rc = new ReflectionClass("stdClass");
11
12try {
13$rc->getProperty("UndefC::p");
14} catch (ReflectionException $e) {
15  echo $e->getMessage();
16}
17?>
18--EXPECT--
19In autoload: string(6) "undefc"
20Class "undefc" does not exist
21