Request for Comments: Trailing comma function args

Introduction

PHP has long supported trailing commas in array declarations like so:

<?php
$a = array(
'Orange',
'Apple',
'Banana',
);

This is useful for VCS (cvs, svn, git, hg, etc…) since individual lines in the list may be modified, added, or removed without having to touch unrelated lines which happen to be at the end of the list.

Function call arguments do not share this trait.

<?php
// This is an error
$fp = fopen(
"sample.txt",
"r+",
);

Which means that adding additional parameters to the call forces touching both the new line and the prior one, which is bad for VCS history.

Similarly, function declarations have the same inconsistency with array() and list().