xref: /PHP-5.4/Zend/tests/traits/bug55554g.phpt (revision e14354af)
1--TEST--
2Bug #55137 (Legacy constructor not registered for class)
3--FILE--
4<?php
5
6// Ensuring that inconsistent constructor use results in an error to avoid
7// problems creeping in.
8
9trait TLegacy {
10    public function ReportCollision() {
11        echo "TLegacy executed\n";
12    }
13}
14
15class ReportCollision {
16    use TLegacy;
17
18	public function __construct() {
19	    echo "ReportCollision executed\n";
20	}
21}
22
23
24echo "ReportCollision: ";
25$o = new ReportCollision;
26
27
28--EXPECTF--
29Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d