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"
39