autoload_017.phpt 402 B

1234567891011121314151617181920
  1. --TEST--
  2. Ensure ReflectionClass::implementsInterface 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->implementsInterface("UndefI");
  12. } catch (ReflectionException $e) {
  13. echo $e->getMessage();
  14. }
  15. ?>
  16. --EXPECT--
  17. In autoload: string(6) "UndefI"
  18. Interface "UndefI" does not exist