Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-24 Thread Zeev Suraski
At 01:08 24/08/2003, Stefan Walk wrote: On Sat, Aug 23, 2003 at 09:58:49PM +, Timm Friebe wrote: > On Sat, 2003-08-23 at 21:15, Matthias Nothhaft wrote: > Use the singleton pattern: > MYFW::getInstance()->method_a(); Which doesn't work yet, to prevent misunderstandings... Sure does. Zeev --

Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Stefan Walk
On Sat, Aug 23, 2003 at 09:58:49PM +, Timm Friebe wrote: > On Sat, 2003-08-23 at 21:15, Matthias Nothhaft wrote: > Use the singleton pattern: > MYFW::getInstance()->method_a(); Which doesn't work yet, to prevent misunderstandings... > Global variables are evil. Anything is evil if misused.

Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Timm Friebe
On Sat, 2003-08-23 at 21:15, Matthias Nothhaft wrote: [...User-land superglobals...] > $_MYFW->method_a(); is nicer than $GLOBALS['_MYFW']->method_a(); > and also shorter for vars u're using very often... Use the singleton pattern: MYFW::getInstance()->method_a(); Global variables are evil. -

Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Stefan Walk
On Sat, Aug 23, 2003 at 11:15:34PM +0200, Matthias Nothhaft wrote: > $_MYFW->method_a(); is nicer than $GLOBALS['_MYFW']->method_a(); > and also shorter for vars u're using very often... global $_MYFW; works fine there. > Regards, > Matthias -- Regards, Stefan Walk <[EMAIL PROTECTED]> -- PHP

Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Matthias Nothhaft
Hi Andi Gutmans, you wrote: Hi, This has been discussed in the past (see the archives of either this list or engine2). You'll have to manage with the existing ones. Very sad. Why is that? I took a look into the archive but couldn't find any reason!? Is it such a hard problem to get this work?

Re: [PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Andi Gutmans
Hi, This has been discussed in the past (see the archives of either this list or engine2). You'll have to manage with the existing ones. Andi At 09:21 PM 8/23/2003 +0200, Matthias Nothhaft wrote: Hi Devs, is there a possibility to get a php function like declare_superglobal($_MYVAR); And the

[PHP-DEV] feature request: user-defined superglobals

2003-08-23 Thread Matthias Nothhaft
Hi Devs, is there a possibility to get a php function like declare_superglobal($_MYVAR); And then be able to use $_MYVAR as the existing superglobals ($_GET, $_SESSION, etc.) ??? I think, it would be a really nice feature! Is that a huge problem to get this work? Regards, Matthias -- PHP Interna