mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
c48b745f00
This implements the last remaining part of the https://wiki.php.net/rfc/engine_warnings RFC. Closes GH-5927.
22 lines
384 B
PHP
22 lines
384 B
PHP
--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
|