Re: Arrays: Comma at end?
| From: | Micky Hulse | Date: | Wed, 08 Feb 2012 18:10:30 +0000 |
| Subject: | Re: Arrays: Comma at end? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316561@lists.php.net to get a copy of this message | ||
On Wed, Feb 8, 2012 at 9:58 AM, Larry Garfield <larry@garfieldtech.com> wrote:
> Drupal's coding standards encourage the extra trailing comma on multi-line
> arrays, for all the readability and editability benefits that others have
> mentioned. We have for years. Cool stuff. :-)
Yah, I love that syntax guideline/rule in Python (tuples and other
things). I will definitely start doing this in PHP for arrays.
I am just surprised that there wasn't an older version of PHP that did
not allow this... I must have picked up this habit via my JS coding
knowledge. :D
Thanks again all!
Cheers,
Micky