1--TEST--
2Test nullsafe operator on delayed dim
3--FILE--
4<?php
5
6$arr = [
7    'foo' => null,
8    'bar' => [
9        'baz' => null,
10    ],
11];
12
13var_dump($arr['foo']?->something);
14var_dump($arr['invalid']?->something);
15
16var_dump($arr['bar']['baz']?->something);
17var_dump($arr['bar']['invalid']?->something);
18
19?>
20--EXPECTF--
21NULL
22
23Warning: Undefined array key "invalid" in %s.php on line 11
24NULL
25NULL
26
27Warning: Undefined array key "invalid" in %s.php on line 14
28NULL
29