xref: /PHP-5.6/Zend/tests/bug62907.phpt (revision 6c0508f8)
1--TEST--
2Bug #62907 (Double free when use traits)
3--FILE--
4<?php
5function __autoload($name) {
6    if ($name == "B") {
7        eval ("abstract class B extends A { }");
8    } else if ($name == "A") {
9        eval ("abstract class A { use T { T::__construct as __asconstruct; }}");
10    } else if ($name == "T") {
11        eval ("trait T { public function __construct() { } }");
12    }
13    return TRUE;
14}
15
16class C extends B {
17    public function __construct() {
18    }
19}
20echo "okey";
21--EXPECT--
22okey
23