get_class_methods_002.phpt 639 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. get_class_methods(): Testing with interface
  3. --FILE--
  4. <?php
  5. interface A {
  6. function a();
  7. function b();
  8. }
  9. class B implements A {
  10. public function a() { }
  11. public function b() { }
  12. public function __construct() {
  13. var_dump(get_class_methods('A'));
  14. var_dump(get_class_methods('B'));
  15. }
  16. public function __destruct() { }
  17. }
  18. new B;
  19. ?>
  20. --EXPECTF--
  21. Strict Standards: Redefining already defined constructor for class B in %s on line %d
  22. array(2) {
  23. [0]=>
  24. string(1) "a"
  25. [1]=>
  26. string(1) "b"
  27. }
  28. array(4) {
  29. [0]=>
  30. string(1) "a"
  31. [1]=>
  32. string(1) "b"
  33. [2]=>
  34. string(11) "__construct"
  35. [3]=>
  36. string(10) "__destruct"
  37. }