Re: Legal variable names

From: Date: Wed, 22 Nov 2000 16:18:00 +0000
Subject: Re: Legal variable names
References: 1  Groups: php.lang 
Request: Send a blank email to php-lang+get-80@lists.php.net to get a copy of this message
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 I'm not sure if I already said, using variables varialbles this might be helpful $a=array('foobar 1','foobar 2','foobar 3','foobar1',' foobar 1'); foreach($a AS $val) { $$val=somestuff(); } this is fairly legal right now and of course this should be legal to be able to access them manually echo ${'foobar 1'}; if wisely used an interesting feature andré -- · André Langhorst · t: +49 571 3201801 · · waldschrott@php.net · m: +49 173 9558736 · · PHP Quality Assurance · http://qa.php.net ·

« previous php.lang (#80) next »