autoload_016.phpt 384 B

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