On Wed, 2011-07-13 at 23:27 +0100, Tim Streater wrote:
> On 13 Jul 2011 at 22:39, Micky Hulse <rgmi...@gmail.com> wrote: 
> 
> > They must mean labels as in "general naming convention rules for
> > programming"... Like not naming a variable/function "label" with a number at
> > the front.
> >
> > Here's a page about variables:
> >
> > http://www.php.net/manual/en/language.variables.basics.php
> >
> > Variable names follow the same rules as other labels in PHP. A valid
> > variable name starts with a letter or underscore, followed by any
> > number of letters, numbers, or underscores. As a regular expression,
> > it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
> 
> Except that variables are case-sensitive whereas function names are not. And 
> if there's going to be a formal or "programmatic" definition, then I think 
> I'd prefer BNF to a regexp.
> 
> --
> Cheers  --  Tim
> 

Isn't that statement a little misleading?

> A valid variable name starts with a letter or underscore

If I am not mistaken, $_1 is not a valid variable name.  

Steve.


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

Reply via email to