xref: /PHP-7.4/Zend/tests/traits/bug65576b.phpt (revision d679f022)
1--TEST--
2Bug #65576 (Constructor from trait conflicts with inherited constructor)
3--FILE--
4<?php
5
6trait T
7{
8  public function __construct()
9  {
10    parent::__construct();
11    echo "Trait constructor\n";
12  }
13}
14
15class A
16{
17  public function __construct()
18  {
19    echo "Parent constructor\n";
20  }
21}
22
23class B extends A
24{
25  use T;
26}
27
28new B();
29--EXPECT--
30Parent constructor
31Trait constructor
32