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