autoload_014.phpt 356 B

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