mirror of
https://github.com/php/php-src.git
synced 2024-12-12 03:15:29 +08:00
14 lines
232 B
PHP
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
|