xref: /PHP-8.0/ext/opcache/tests/bug78986.phpt (revision f8d79582)
1--TEST--
2Bug #78986: Opcache segfaults when inheriting ctor from immutable into mutable class
3--FILE--
4<?php
5
6define('TEST_TEST', 1);
7
8class TestClass2 {
9    function __construct() {}
10}
11
12class TestClass extends TestClass2 {
13    var $test = [
14        TEST_TEST => 'test'
15    ];
16}
17
18var_dump(new TestClass());
19
20?>
21--EXPECT--
22object(TestClass)#1 (1) {
23  ["test"]=>
24  array(1) {
25    [1]=>
26    string(4) "test"
27  }
28}
29