php4-strict?

From: Date: Mon, 14 May 2001 22:00:05 +0000
Subject: php4-strict?
Groups: php.lang 
Request: Send a blank email to php-lang+get-153@lists.php.net to get a copy of this message
Hi, Currently the namespace of variables is very broad, variable-names can be any string, even the empty one. (using the ${expr} syntax) Of course, this yields the fastest results, since all variable-name checking would just take more time. But isn't it a good idea to introduce some 'php4-strict' directive, and with that directive on, this is not allowed anymore, along with some other deprecated but still working constructs? Current scripts won't get broken, but if you want to be sure that you're programming right, you should turn it on, just like you should turn on error-reporting=E_ALL when programming. Notices like 'variable not initialised' should also only be generated/checked for when this directive is on. On production sites, the directive should be turned off: the script will be (marginally) faster, and you won't get non-critical errors to the user. Greetz, Jeroen jeroen@a-es2.uu.nl

« previous php.lang (#153) next »