summaryrefslogtreecommitdiff
path: root/Zend/tests/foreach_list_003.phpt
blob: 8674ecd754ffb8c47974e65fe03764397d525a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
foreach with list key
--FILE--
<?php

$array = [['a', 'b'], 'c', 'd'];

foreach($array as list($key) => list(list(), $a)) {
}

?>
--EXPECTF--
Fatal error: Cannot use list as key element in %sforeach_list_003.php on line %d