From: Jeff D. <da...@da...> - 2003-02-26 23:15:36
|
On Wed, 26 Feb 2003 12:35:59 -0700 Aredridel <are...@nb...> wrote: > May I suggest a "versioncompat.php" that, for example, moves > HTTP_POST_VARS to _POST, HTTP_GET_VARS to _GET, if is_a is not defined, > defines one (it's trivial to make a function that does the same), and > various other things like that. > If functions need _GET, one should global it, as it's not autoglobal in > < 4.3, but there's no reason not to use the new names. The reason we haven't moved to _GET in PhpWiki is just exactly the autoglobal semantics. Since you'd have to global $_GET; anyway, might was well do $_GET = &$GLOBALS['HTTP_GET_VARS']; (or just use HTTP_GET_VARS.) It makes it explicit that we're not using a real (autoglobal) $_GET. As far as implementing replacement functions, a compat.php is a fine idea. (We already do define functions like this, when they're needed, but their definitions are scattered all over the place. Grep for 'function_exists'.) It's probably a good idea to normalize some of the names, too. E.g. we have isa() instead of is_a() for historical reasons (we invented it before PHP did, I think). |