Re: Arrays: Comma at end?
| From: | Micky Hulse | Date: | Tue, 07 Feb 2012 20:19:34 +0000 |
| Subject: | Re: Arrays: Comma at end? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316542@lists.php.net to get a copy of this message | ||
On Tue, Feb 7, 2012 at 12:15 PM, Paul M Foster <paulf@quillandmouse.com> wrote:
> I've always avoided trailing array commas, but only because I was under
> the impression that leaving one there would append a blank array member
> to the array, where it might be problematic. Yes? No?
Yah, ditto! :D
In my few simple tests, using PHP5.x, the last comma is ignored.
Just feels strange to have avoided doing something for so long, only
to learn that it's something I need not worry about! :D