xref: /PHP-8.1/ext/spl/tests/bug70852.phpt (revision c48b745f)
1--TEST--
2Bug #70852 Segfault getting NULL offset of an ArrayObject
3--FILE--
4<?php
5$y = new ArrayObject();
6
7var_dump($y[NULL]);
8var_dump($y[NULL]++);
9?>
10--EXPECTF--
11Warning: Undefined array key "" in %s on line %d
12NULL
13
14Warning: Undefined array key "" in %s on line %d
15NULL
16