xref: /PHP-8.1/ext/spl/tests/bug64106.phpt (revision 6d805ed2)
1--TEST--
2Bug #64106: Segfault on SplFixedArray[][x] = y when extended
3--FILE--
4<?php
5
6class MyFixedArray extends SplFixedArray {
7    public function offsetGet($offset): mixed { var_dump($offset);  return null; }
8}
9
10$array = new MyFixedArray(10);
11$array[][1] = 10;
12
13?>
14--EXPECTF--
15NULL
16
17Notice: Indirect modification of overloaded element of MyFixedArray has no effect in %s on line %d
18