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