xref: /PHP-7.2/tests/classes/autoload_016.phpt (revision 7af945e2)
1--TEST--
2Ensure ReflectionClass::getProperty() 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
12$rc = new ReflectionClass("stdClass");
13
14try {
15$rc->getProperty("UndefC::p");
16} catch (ReflectionException $e) {
17  echo $e->getMessage();
18}
19?>
20--EXPECTF--
21In autoload: string(6) "undefc"
22Class undefc does not exist
23