mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
19 lines
328 B
Markdown
19 lines
328 B
Markdown
|
---
|
||
|
id: 4bf0a31f-50eb-4b42-8d5d-54e6777147a4
|
||
|
title: Trailing Comma in Parameter Lists
|
||
|
---
|
||
|
|
||
|
# Description
|
||
|
|
||
|
PHP8 allows trailing commas[^1] to bue used in parameters lists.
|
||
|
|
||
|
# Syntax
|
||
|
|
||
|
``` php
|
||
|
function tralala(string $a, string $b, string $c,) {}
|
||
|
```
|
||
|
|
||
|
# Footnotes
|
||
|
|
||
|
[^1]: <https://wiki.php.net/rfc/trailing_comma_in_parameter_list>
|