mirror of
https://github.com/php/php-src.git
synced 2026-04-16 20:41:18 +02:00
Squashed commit of the following: commit0361dbe356Author: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:59:20 2016 +0000 UPGRADING and NEWS commitdca9d4a36cAuthor: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:45:18 2016 +0000 Add tests contributed by @jesseschalken commite557f77eabAuthor: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:44:51 2016 +0000 Rebuild VM commit70942e4c3cAuthor: Andrea Faulds <ajf@ajf.me> Date: Wed Feb 24 13:12:26 2016 +0000 Add test for evaluation order of nested list() keys commited3592e80cAuthor: Andrea Faulds <ajf@ajf.me> Date: Wed Feb 24 12:42:04 2016 +0000 Add test for evaluation order commit589756cbccAuthor: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 19 17:29:34 2016 +0000 Allow arbitrary expressions for key commit3f622077c3Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 19 17:45:10 2016 +0000 Remove compile-time HANDLE_NUMERIC (see bug #63217) commitbab758119aAuthor: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 17 01:20:26 2016 +0000 Handle numeric strings commit14bfe93ddcAuthor: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 17 01:09:36 2016 +0000 Allow trailing comma commitf4c8b2cb30Author: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 23:47:11 2016 +0000 Add tests commit0085884a61Author: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 22:24:23 2016 +0000 Handle non-integer/string opcodes commite572d2d0adAuthor: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 21:10:33 2016 +0000 Disallow mixing keyed and unkeyed list() elements commitcede13ccfeAuthor: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 10 20:46:44 2016 +0000 list() with keys (no foreach or tests)
23 lines
376 B
PHP
23 lines
376 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--
|
|
|
|
Notice: Undefined offset: 5 in %s on line %d
|
|
|
|
Notice: Undefined index: duke in %s on line %d
|
|
NULL
|
|
NULL
|