Make use of use
| From: | Timm Friebe | Date: | Sun, 06 Apr 2003 14:02:17 +0000 |
| Subject: | Make use of use | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-741@lists.php.net to get a copy of this message | ||
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