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

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

update php

File size: 462 bytes
Line 
1--TEST--
2list() with keys and a trailing comma
3--FILE--
4<?php
5
6$antonyms = [
7    "good" => "bad",
8    "happy" => "sad",
9];
10
11list(
12    "good" => $good,
13    "happy" => $happy
14) = $antonyms;
15
16var_dump($good, $happy);
17
18echo PHP_EOL;
19
20$antonyms = [
21    "good" => "bad",
22    "happy" => "sad",
23];
24
25list(
26    "good" => $good,
27    "happy" => $happy,
28) = $antonyms;
29
30var_dump($good, $happy);
31
32?>
33--EXPECT--
34string(3) "bad"
35string(3) "sad"
36
37string(3) "bad"
38string(3) "sad"
Note: See TracBrowser for help on using the repository browser.