illustrate
1. Append a trailing comma at the end of the parameter, element, and variable lists.
Sometimes we need to pass a large number of elements in arrays and function calls (especially variable parameter functions). If a comma is missed, an error will be reported.
2. This feature has been allowed to be used within arrays, and starting from PHP 7.2, the grouped namespace syntax also supports trailing commas.
Example
use FooBar{ Foo, Bar, }; $foo = [ 'foo', 'bar', ];
The above is the use of trailing commas in php. I hope it will be helpful to everyone.