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');
=> Replace set_error_handler()
- use globals;
=> Auto-populate $_* variables
...
- Timm
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php