1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/Zend/tests/list_mixed_keyed_unkeyed.phpt
T
2016-05-20 01:51:05 +02:00

17 lines
336 B
PHP

--TEST--
list() with both keyed and unkeyed elements
--FILE--
<?php
$contrivedKeyedAndUnkeyedArrayExample = [
0,
1 => 1,
"foo" => "bar"
];
list($zero, 1 => $one, "foo" => $foo) = $contrivedKeyedAndUnkeyedArrayExample;
?>
--EXPECTF--
Fatal error: Cannot mix keyed and unkeyed array entries in assignments in %s on line %d