xref: /PHP-7.2/tests/classes/autoload_015.phpt (revision 7af945e2)
1--TEST--
2Ensure the ReflectionProperty constructor triggers autoload.
3--SKIPIF--
4<?php extension_loaded('reflection') or die('skip'); ?>
5--FILE--
6<?php
7spl_autoload_register(function ($name) {
8  echo "In autoload: ";
9  var_dump($name);
10});
11
12try {
13  new ReflectionProperty('UndefC', 'p');
14}
15catch (ReflectionException $e) {
16  echo $e->getMessage();
17}
18?>
19--EXPECTF--
20In autoload: string(6) "UndefC"
21Class UndefC does not exist
22