xref: /PHP-5.5/Zend/tests/traits/bug55554f.phpt (revision 7e4b9800)
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 TNew {
10    public function __construct() {
11        echo "TNew executed\n";
12    }
13}
14
15class ReportCollision {
16    use TNew;
17
18	public function ReportCollision() {
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