1--TEST--
2Const array deference
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7var_dump([1, 2, 3, 4,][3]);
8var_dump([1, 2, 3, 4]['foo']);
9var_dump([array(1,2,3), [4, 5, 6]][1][2]);
10
11foreach (array([1, 2, 3])[0] as $var) {
12     echo $var;
13}
14?>
15--EXPECTF--
16int(4)
17
18Notice: Undefined index: foo in %sconst_dereference_003.php on line %d
19NULL
20int(6)
21123
22