mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
23 lines
265 B
PHP
23 lines
265 B
PHP
--TEST--
|
|
foreach with freak lists
|
|
--FILE--
|
|
<?php
|
|
|
|
foreach (array(array(1,2), array(3,4)) as list($a, )) {
|
|
var_dump($a);
|
|
}
|
|
|
|
$array = [['a', 'b'], 'c', 'd'];
|
|
|
|
foreach($array as list(, $a)) {
|
|
var_dump($a);
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(3)
|
|
string(1) "b"
|
|
NULL
|
|
NULL
|