xref: /PHP-5.6/Zend/tests/bug63305.phpt (revision 74228c51)
1--TEST--
2Bug #63305 (zend_mm_heap corrupted with traits)
3--FILE--
4<?php
5new Attachment("");
6
7function __autoload($class) {
8    switch ($class) {
9    case "Attachment":
10        eval(<<<'PHP'
11class Attachment extends File {
12}
13PHP
14    );
15        break;
16    case "File":
17        eval(<<<'PHP'
18class File {
19    use TDatabaseObject {
20        TDatabaseObject::__construct as private databaseObjectConstruct;
21    }
22    public function __construct() {
23    }
24}
25PHP
26    );
27        break;
28    case "TDatabaseObject":
29        eval(<<<'PHP'
30trait TDatabaseObject {
31    public function __construct() {
32    }
33}
34PHP
35    );
36        break;
37    }
38    return TRUE;
39}
40echo "okey";
41?>
42--EXPECT--
43okey
44