1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/Zend/tests/foreach_list_002.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

23 lines
266 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