source: src/router/php7/Zend/tests/list_keyed_undefined.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 376 bytes
Line 
1--TEST--
2list() with undefined keys
3--FILE--
4<?php
5
6$contrivedMixedKeyTypesExample = [
7    7 => "the best PHP version",
8    "elePHPant" => "the cutest mascot"
9];
10
11list(5 => $five, "duke" => $duke) = $contrivedMixedKeyTypesExample;
12
13var_dump($five, $duke);
14
15?>
16--EXPECTF--
17
18Notice: Undefined offset: 5 in %s on line %d
19
20Notice: Undefined index: duke in %s on line %d
21NULL
22NULL
Note: See TracBrowser for help on using the repository browser.