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