interface_exists_001.phpt 362 B

123456789101112131415161718192021
  1. --TEST--
  2. Testing interface_exists()
  3. --FILE--
  4. <?php
  5. interface foo {
  6. }
  7. var_dump(interface_exists('foo'));
  8. var_dump(interface_exists(1));
  9. var_dump(interface_exists(NULL));
  10. var_dump(interface_exists(new stdClass));
  11. ?>
  12. --EXPECTF--
  13. bool(true)
  14. bool(false)
  15. bool(false)
  16. Warning: interface_exists() expects parameter 1 to be string, object given in %s on line %d
  17. NULL