Re: global array
| From: | Ashley Sheridan | Date: | Thu, 14 Jun 2012 19:35:20 +0000 |
| Subject: | Re: global array | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318240@lists.php.net to get a copy of this message | ||
On Thu, 2012-06-14 at 15:13 -0400, Jim Giner wrote:
> "Al" <news@ridersite.org> wrote in message
> news:6B.C0.39100.4EF1ADF4@pb1.pair.com...
> >
> >
> > On 6/14/2012 12:49 PM, Jim Giner wrote:
> >> Yes - PHP is very picky. Hence I never capitalize anything! I use
> >> underscores to make varnames more understandable, as in $inv_req
> >>
> >>
> >
> > There is another nice custom e.g. $invReg it's easy to read and it doesn't
> > conflict with PHP syntax for some functions e.g., in_aray(). and defines
> > DOCUMENT_ROOT
>
> And what is that custom?
>
>
>
I think he means camelCase naming syntax. It does tend to involve fewer
keystrokes and results in shorter names that might more easily fit to a
screen or paper, but I have to say I prefer the underscore convention,
it just makes things much more readable (which is probably why built-in
PHP functions and constants use it)
--
Thanks,
Ash
http://www.ashleysheridan.co.uk