Trailing comma in function calls not documented
Upd. The bug appeared for a different reason.
_From manual page: https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list
I did tests on versions: 7.2 -> PHP Parse error: syntax error, unexpected ')' 7.4 -> it works
I don't know what code you tried but examples 11 and 12 work since at least PHP 7.0, which is the oldest version of PHP that the manual is intended to cover.
Oops! The bug appeared for a different reason.
$ ./test.php PHP Parse error: syntax error, unexpected ')' in /home/onotole/1/test.php on line 6
It works.
Ubuntu 20.04 server. Repo: https://launchpad.net/~ondrej/+archive/ubuntu/php
7.2 -> PHP Parse error: syntax error, unexpected ')'
This is due to https://wiki.php.net/rfc/trailing-comma-function-calls; only available as of PHP 7.3.0, and apparently not documented. I could only find the trailing comma in function signatures, but not in calls.