autoload_017.phpt 481 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Ensure ReflectionClass::implementsInterface triggers autoload.
  3. --SKIPIF--
  4. <?php extension_loaded('reflection') or die('skip'); ?>
  5. --FILE--
  6. <?php
  7. function __autoload($name)
  8. {
  9. echo "In autoload: ";
  10. var_dump($name);
  11. }
  12. $rc = new ReflectionClass("stdClass");
  13. try {
  14. $rc->implementsInterface("UndefI");
  15. } catch (ReflectionException $e) {
  16. echo $e->getMessage();
  17. }
  18. ?>
  19. --EXPECTF--
  20. In autoload: string(6) "UndefI"
  21. Interface UndefI does not exist