You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of PHP 7.3, a trailing comma will be allowed after the last parameter in a function call and in calls to isset() and unset().
This is mostly useful to keep a clean code history when using multi-line calls with each parameter on a new line.
Only apply this change to multi-line calls where each parameter is on a new line (nr of parameters === the diff in line number of the function call T_STRING and the closing parenthesis).
Beware of trailing comments after the last parameter!
Trailing comma's are also allowed in calls to closures and methods.
The text was updated successfully, but these errors were encountered:
Short description
As of PHP 7.3, a trailing comma will be allowed after the last parameter in a function call and in calls to
isset()
andunset()
.This is mostly useful to keep a clean code history when using multi-line calls with each parameter on a new line.
Related PHPCompatibility sniff(s):
NewTrailingComma
(PHP 7.3: new sniff to detect trailing comma's in function calls, isset() and unset() PHPCompatibility#632)PHP manual references:
Example code:
Detect the following code pattern(s):
And fix these to:
Notes for implementation of the sniff:
The text was updated successfully, but these errors were encountered: