php-src/tests/classes/autoload_016.phpt

21 lines
382 B
Plaintext
Raw Normal View History

--TEST--
Ensure ReflectionClass::getProperty() triggers autoload
--FILE--
<?php
2017-01-30 21:28:17 +00:00
spl_autoload_register(function ($name) {
echo "In autoload: ";
var_dump($name);
});
2017-01-30 21:28:17 +00:00
$rc = new ReflectionClass("stdClass");
try {
$rc->getProperty("UndefC::p");
} catch (ReflectionException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
In autoload: string(6) "undefc"
Class undefc does not exist