Re: [PHP] What is a label?

2011-07-14 Thread Daniel Brown
On Wed, Jul 13, 2011 at 16:57, Tim Streater wrote: > Looking over the definition of a function today I see: > >    Function names follow the same rules as other labels in PHP. > > but I can't find the definition of a label anywhere. I can't see it listed in > the contents - have I overlooked it?

Re: Re: [PHP] What is a label?

2011-07-14 Thread Richard Quadling
On 14 July 2011 13:37, Steve Staples wrote: >> A valid variable name starts with a letter or underscore > > If I am not mistaken, $_1 is not a valid variable name. [2011-07-14 13:19:18] [Z:\] [\\richardquadling\scratch$ ] >php -r "$_1 = 'one'; echo $_1;" one It starts with an undercore and is, t

Re: Re: [PHP] What is a label?

2011-07-14 Thread Steve Staples
On Thu, 2011-07-14 at 13:39 +0100, Stuart Dallas wrote: > On Thu, Jul 14, 2011 at 1:37 PM, Steve Staples wrote: > > > On Wed, 2011-07-13 at 23:27 +0100, Tim Streater wrote: > > > A valid variable name starts with a letter or underscore > > > > If I am not mistaken, $_1 is not a valid variable nam

Re: Re: [PHP] What is a label?

2011-07-14 Thread Stuart Dallas
On Thu, Jul 14, 2011 at 1:37 PM, Steve Staples wrote: > On Wed, 2011-07-13 at 23:27 +0100, Tim Streater wrote: > > A valid variable name starts with a letter or underscore > > If I am not mistaken, $_1 is not a valid variable name. You are mistaken. Try it. -Stuart -- Stuart Dallas 3ft9 Ltd

Re: Re: [PHP] What is a label?

2011-07-14 Thread Steve Staples
On Wed, 2011-07-13 at 23:27 +0100, Tim Streater wrote: > On 13 Jul 2011 at 22:39, Micky Hulse 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

Re: Re: [PHP] What is a label?

2011-07-13 Thread Tim Streater
On 13 Jul 2011 at 22:39, Micky Hulse 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

Re: [PHP] What is a label?

2011-07-13 Thread Micky Hulse
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

[PHP] What is a label?

2011-07-13 Thread Tim Streater
Looking over the definition of a function today I see: Function names follow the same rules as other labels in PHP. but I can't find the definition of a label anywhere. I can't see it listed in the contents - have I overlooked it? If not, how can I request the the doccy be updated? Tim Str