Add support for specifying keys for list()
Open
feature request
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
PHP 7.1.0 updated `list` to allow you to specify the keys you want to destructure. See https://wiki.php.net/rfc/list_keys for the RFC
3v4l: https://3v4l.org/rXOGC
### HHVM Version
3.16.0-dev
### Standalone code, or other way to reproduce the problem
```
'Facebook', 'name' => 'Daniel'];
list('name' => $name) = $data;
echo 'Hello ', $name;
```
### Expected result
```
Hello Daniel
```
### Actual result
```
Fatal error: syntax error, unexpected T_DOUBLE_ARROW, expecting T_DOUBLE_COLON in /tmp/test.php on line 3
```
Contributor guide
Assessment
This issue has not been assessed yet.