bug65579.phpt 495 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #65579 (Using traits with get_class_methods causes segfault)
  3. --FILE--
  4. <?php
  5. trait ParentTrait {
  6. public function testMethod() { }
  7. }
  8. trait ChildTrait {
  9. use ParentTrait {
  10. testMethod as testMethodFromParentTrait;
  11. }
  12. public function testMethod() { }
  13. }
  14. class TestClass {
  15. use ChildTrait;
  16. }
  17. $obj = new TestClass();
  18. var_dump(get_class_methods($obj));
  19. ?>
  20. --EXPECT--
  21. array(2) {
  22. [0]=>
  23. string(10) "testMethod"
  24. [1]=>
  25. string(25) "testMethodFromParentTrait"
  26. }