bug55554e.phpt 585 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #55137 (Legacy constructor not registered for class)
  3. --FILE--
  4. <?php
  5. // Ensuring that the collision still occurs as expected.
  6. trait TC1 {
  7. public function ReportCollision() {
  8. echo "TC1 executed\n";
  9. }
  10. }
  11. trait TC2 {
  12. public function ReportCollision() {
  13. echo "TC1 executed\n";
  14. }
  15. }
  16. class ReportCollision {
  17. use TC1, TC2;
  18. }
  19. echo "ReportCollision: ";
  20. $o = new ReportCollision;
  21. --EXPECTF--
  22. Fatal error: Trait method ReportCollision has not been applied, because there are collisions with other trait methods on ReportCollision in %s on line %d