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

From: Date: Thu, 21 Jan 2010 18:08:32 +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-46859@lists.php.net to get a copy of this message
>> >> For BC, I suppose PHP could have *both* 'a.b' and 'a_b', or yet >> another php.ini flag (sorry!) to choose the behaviour. > >-1 from me. >I don't think we need to keep backward compatibility for this. PHP-6 is a >major release, after all. > >It would be absolutely enough to add optional var-name conversion to >extract()= By default extract _ignores_ variables with dots like a.b Even though register_globals should be removed, it does not mean that the default behaviour of extract should be changed. If it's _necessary_ to provide a way to mimic register_globals functionality, a special flag for it should be added, something like EXTR_MIMIC_REGISTER_GLOBALS that will replaces incorrect characters in the variable names with underscrores. In this case BC won't be broken.

« previous php.internals (#46859) next »