There currently is a keyword "use" in the engine, reserved for future
use:
1.1 (zeev 29-Oct-00): | T_USE [...]
With all the discussions about errors and ini settings, why not use use
to put PHP into different modes on a per-script-basis?
Some ideas that came to my head:
-
use strict;
=> bail on undefined string- / array offsets / undeclared variables? -
use exceptions;
-
use error::mode(exceptions, E_ALL);
-
use error::mode(exceptions, E_WARNING);
=> Use exceptions instead of zend_error -
use sybase::magic_quotes;
=> Enable feature -
use ini::default_mime_type('text/xml');
=> Use it to set PHP_INI_ALL entries -
use oop::implicit_clone;
=> Activate BC features -
use lang::float_seperator(',');
=> Change EG(float_seperator) -
use oop('php', *);
=> Declare we want to use (import) the built-in classes -
use error::handler('my_error_handler');
=> Replaceset_error_handler() -
use globals;
=> Auto-populate $_* variables
...
- Timm
<snip>There currently is a keyword "use" in the engine, reserved for future
use:1.1 (zeev 29-Oct-00): |
T_USE[...]With all the discussions about errors and ini settings, why not use use
to put PHP into different modes on a per-script-basis?Some ideas that came to my head:
- use strict;
=> bail on undefined string- / array offsets / undeclared variables?
use java;
Derick
--
"my other box is your windows PC"
Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
[...]
<snip>use java;
use alotofmemory;
:)
- Timm
Timm Friebe wrote:
use java;
use alotofmemory;
s/use/waste/
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/