Re: Dots and spaces in variable names are converted to underscores.

From: Date: Wed, 20 Jan 2010 22:45:18 +0000
Subject: Re: Dots and spaces in variable names are converted to underscores.
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-46845@lists.php.net to get a copy of this message
Stan Vassilev wrote:
Well, that conversion still needs to happen somewhere, since plenty of apps call extract() on those superglobals, but with register_globals entirely gone in PHP 6, I suppose that conversion can be moved to the extract() call. -Rasmus
Hi, I'm not sure it needs to happen anywhere. Such symbols could be simply referred to with the intended syntax: ${'a.b.c.d'}. By the way, extract now seems to just ignore those vars when given an array: extract(array('foo.bar' => 'baz')); echo ${'foo.bar'}; // notice, no such variable echo $foo_bar; // notice, no such variable Right, because it expects the source array to already have been converted.
-Rasmus

Thread (22 messages)

« previous php.internals (#46845) next »