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

From: Date: Wed, 20 Jan 2010 22:38:47 +0000
Subject: Re: Dots and spaces in variable names are converted to underscores.
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-46844@lists.php.net to get a copy of this message
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 Regards, Stan Vassilev

Thread (22 messages)

« previous php.internals (#46844) next »