blob: df4aa67f13e5fcc22148637a81b19706148e9daf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
list() with undefined keys
--FILE--
<?php
$contrivedMixedKeyTypesExample = [
7 => "the best PHP version",
"elePHPant" => "the cutest mascot"
];
list(5 => $five, "duke" => $duke) = $contrivedMixedKeyTypesExample;
var_dump($five, $duke);
?>
--EXPECTF--
Warning: Undefined array key 5 in %s on line %d
Warning: Undefined array key "duke" in %s on line %d
NULL
NULL
|