Make use of use

php.internals

Timm Friebe

23 years ago
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

Derick Rethans

23 years ago
On Sun, 6 Apr 2003, Timm Friebe wrote:
> 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?
<snip> 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/ -------------------------------------------------------------------------

Timm Friebe

23 years ago
On Sun, 2003-04-06 at 16:04, Derick Rethans wrote: [...]
> <snip> > > use java;
use alotofmemory; :) - Timm

Sebastian Bergmann

23 years ago
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/

(Marcus Börger)

23 years ago
At 16:30 06.04.2003, Sebastian Bergmann wrote:
>Timm Friebe wrote: > >> use java; > > use alotofmemory; > > s/use/waste/
pay doubled price for memory and cpu needs (or even more) marcus