Re: Code Advice

From: Date: Wed, 06 Nov 2002 19:31:05 +0000
Subject: Re: Code Advice
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123053@lists.php.net to get a copy of this message
At 20:13 06.11.2002, Jason Young spoke out and said: --------------------[snip]-------------------- >Hmm.. > >So then can anyone tell me why its working so far? ;) > >I am trying out every single function in this page in hopes to catch >something, but so far I don't see any breakage - I can see there are a >few ways to skin this cat.. the original code I posted DOES work.. I >still may be blind to any future breakings.. that's why I posted it. >Unfortunately, I'm getting responses saying that this code won't work >at all - when it does.. :-/ --------------------[snip]-------------------- Well - it's a miracle... I just tried the code you posted, and indeed PHP (v.4.2.2) allows numeric identifiers - BUT ONLY as long as you're accessing it indirectly. Example: $key = 0; $$key = 'some data'; // works echo $$key; // works echo "Key 0: $0" // prints "$0", not the content (wrong) echo $0; // error "unexpected T_DNUMBER" -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#123053) next »