On Wed, Feb 8, 2012 at 4:10 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
> On Tue, 2012-02-07 at 11:50 -0800, Micky Hulse wrote:
>> Was there ever a time when having a comma at the end of the last array
>> element was not acceptable in PHP?
> It's fine in PHP, and some coding practices actually encourage it, for
> example:
> It's easy to add and remove elements without making sure you have to
> check the trailing comma. It's also OK in Javascript to use the trailing
> comma, as long as you don't mind things not working on IE, which is the
> only browser that has issues with it. As far as PHP goes though, it's
> fine.

I believe this behavior was inherited from Perl.  I used Perl before I
used PHP and it was considered a feature for exactly the reason Ash

I think that problems with Perl may have originally inspired the
creation of PHP, at least in part.  But they kept the good parts.
This is just my perception.  To confirm it, I'd have to ask our BDFL

Vince Aggrippino
a.k.a. Ghodmode

> --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to