php4-strict?
[email protected] ("Jeroen")
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[email protected]> |
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
[email protected]