php-src/Zend/tests/foreach_list_003.phpt
2012-08-26 13:05:33 +08:00

14 lines
232 B
PHP

--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