blob: a18e3b4d20650aa4c240b2b9df9c3a8a5461d5c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--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--
Notice: Undefined offset: 5 in %s on line %d
Notice: Undefined index: duke in %s on line %d
NULL
NULL
|