[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Markus Fischer
On Sun, Jan 13, 2002 at 10:52:32PM +0100, Gabor Hojtsy wrote : > > > The question is to check for $_GET [isset($_GET)] or phpversion() > > > > 4.1.0 [version_compare() is the function for that thing :)]. > > > > > > Well, you are right, that if we are < 4.1.0, you can do: > > > > > > fake.php?_

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Gabor Hojtsy
> > The question is to check for $_GET [isset($_GET)] or phpversion() > > > 4.1.0 [version_compare() is the function for that thing :)]. > > > > Well, you are right, that if we are < 4.1.0, you can do: > > > > fake.php?_GET[a]=b&_GET[c]=d > > > > so my idea may not be that good :) > > Yep

[PHP-DEV] RE: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Richard Heyes
> > > > > session_start(); > > if(ini_get('register_globals') AND !isset($session_global_var)){ > > $session_global_var = array(); > > } > > > > session_register('session_global_var'); > > > > if(ini_get('register_globals')){ > > $SESSION =& $session_global_var; > > }else{ > > $SESSION =& $HTTP_S

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Markus Fischer
On Sun, Jan 13, 2002 at 10:29:00PM +0100, Gabor Hojtsy wrote : > > > > > I mean, you could check php_version() and stick in some extract() > calls > > > > > for older versions wherever you use the superglobals, but that seems > > > > > rather ugly. > > > > > > > > Some really want it, let's defin

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Gabor Hojtsy
> > > > I mean, you could check php_version() and stick in some extract() calls > > > > for older versions wherever you use the superglobals, but that seems > > > > rather ugly. > > > > > > Some really want it, let's define the most efficient/least ugly types of > > > hacks :) For example with ge

Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Markus Fischer
On Sun, Jan 13, 2002 at 08:22:11PM +0100, Gabor Hojtsy wrote : > > > I mean, you could check php_version() and stick in some extract() calls > > > for older versions wherever you use the superglobals, but that seems > > > rather ugly. > > > > Some really want it, let's define the most efficient/

[PHP-DEV] Re: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Gabor Hojtsy
> > session_start(); > if(ini_get('register_globals') AND !isset($session_global_var)){ > $session_global_var = array(); > } > > session_register('session_global_var'); > > if(ini_get('register_globals')){ > $SESSION =& $session_global_var; > }else{ > $SESSION =& $HTTP_SESSION_VARS['session_gl

RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Richard Heyes
> > Now mimicking $_SESSION functionality is another story, eww, > maybe that's > > going too far. > > This can be done by a register_shutdown_function() who registers > all the vars in $_SESSION, using session_register. That's all :)) > If I can understand this new feature correctly (I never used

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Philip Olson
> > Now mimicking $_SESSION functionality is another story, eww, maybe that's > > going too far. > > This can be done by a register_shutdown_function() who registers > all the vars in $_SESSION, using session_register. That's all :)) > If I can understand this new feature correctly (I never used

[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Gabor Hojtsy
> > I mean, you could check php_version() and stick in some extract() calls > > for older versions wherever you use the superglobals, but that seems > > rather ugly. > > Some really want it, let's define the most efficient/least ugly types of > hacks :) For example with get, checking phpversion,

Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Philip Olson
> The only real thing I think you can document on this is that you can't use > superglobals and expect your scripts to work on older versions of PHP. true. We can refer to a faq, one with a hack or two. > I mean, you could check php_version() and stick in some extract() calls > for older versio

Re: [PHP-DEV] superglobals and bc

2002-01-13 Thread Rasmus Lerdorf
The only real thing I think you can document on this is that you can't use superglobals and expect your scripts to work on older versions of PHP. I mean, you could check php_version() and stick in some extract() calls for older versions wherever you use the superglobals, but that seems rather ugl

[PHP-DEV] superglobals and bc

2002-01-13 Thread Philip Olson
Many ask "How do I use superglobals yet allow my scripts to work on older versions of PHP", is there an official documentable response to this? Regards, Philip Olson -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m