Re: backwards compat for newly developed scripts ($_GET / $HTTP_GET_VARS)
| From: | Sascha Cunz | Date: | Wed, 02 Oct 2002 03:44:10 +0000 |
| Subject: | Re: backwards compat for newly developed scripts ($_GET / $HTTP_GET_VARS) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118519@lists.php.net to get a copy of this message | ||
> Hey gang,
> I've been wondering about developing scripts that the end-user might run on
> php < 4.1.0. I've heard allot of ways except for one that I recently
> thought of.
> How about using:
> - ----
> if(!isset($_GET)) { global $HTTP_GET_VARS; $_GET = &$HTTP_GET_VARS; }
> - ----
> ? That allows you to use $_GET as if you were using the new versions and it
> only requires one line....and doesn't depend on the new versions to have
> $HTTP_*_VARS. It also works for the other vars(POST, SESSION, etc).
If any script shall be executeable on such an old PHP release, this method
sounds really good. But, for security reasons i would prefer to ship this in
an extra script, which the user has explicitly to include (Maybe just
paranoia)...
Hmm, anyway it would be better to force those old versions to be updated -
since 1) there was a lot of security changes/updates and other bug fixes 2)
new functions have been developed in more recent versions. i.e. executing
stored procedures on MSSQL. I think, this will force people much more to
update. Wouldn't it be better to force them now, than provide backward
compatibility for _new_ scripts?
Sascha