Re: php4-strict?
| From: | derick@php.net | Date: | Mon, 14 May 2001 22:17:55 +0000 |
| Subject: | Re: php4-strict? | ||
| References: | 1 | Groups: | php.lang |
| Request: | Send a blank email to php-lang+get-154@lists.php.net to get a copy of this message | ||
Hello Jeroen,
There was a big thread on php-dev about this, and it's starting again now.
Mostly the backward compatible stuff was the problem.
Derick
On Tue, 15 May 2001, Jeroen wrote:
> 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
>
>
>
> --
> PHP Language Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-lang-unsubscribe@lists.php.net
> For additional commands, e-mail: php-lang-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick@php.net
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------