blob: 3d1939c5ac499262466d66ca7c58fe3f191c2efb (
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--
Notice: Undefined offset: 5 in %s on line %d
Notice: Undefined index: duke in %s on line %d
NULL
NULL
|