Re: Re: Legal variable names

From: Date: Wed, 22 Nov 2000 16:58:55 +0000
Subject: Re: Re: Legal variable names
References: 1  Groups: php.lang 
Request: Send a blank email to php-lang+get-83@lists.php.net to get a copy of this message
At 18:24 22-11-00, Sascha Schumann wrote:
On Wed, 22 Nov 2000, André Langhorst wrote:
That's what I was asking. I just am rather careful there because somebody wrote that code so he should have meant something by it - maybe there are reasons I'm not aware of.
well as discussed before this code is an relict from register_globals=on
    With regard to php-lang, are there any opinions on whether
    a construct like this should be legal?
        '${' expression '}'
    where expression evaluates to an arbitrary string, not
    necessarily to an identifier (which is basically
    [a-z][a-z0-9]*).
why not? you can even use ä,ü,ö without using ${' äöü '}, should these be legal - let the user decide how to write his code
    Do I understand you correctly that your explanation is
    "because we can"?
Sascha, Again, *YES*, unless it's a blunt bug, then 'because we can' is exactly the right reasoning. Why is it legal to write a for loop in PHP? I'll tell you why, because if you do it, it'll work. That's no different.
Regardless, the above construct seems to be valid since PHP
    3, so it will be part of the specification.
Do you realize that your explanation is identical to that of Andre? :) Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/

« previous php.lang (#83) next »