xref: /PHP-8.0/ext/spl/tests/bug64106.phpt (revision 1903fc62)
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) { var_dump($offset); }
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