note 45759 added to function.version-compare

From: Date: Fri, 17 Sep 2004 13:18:08 +0000
Subject: note 45759 added to function.version-compare
Groups: php.notes 
Request: Send a blank email to php-notes+get-76878@lists.php.net to get a copy of this message
Hi. If want to be sure, that $_GET, $_POST... works in every PHP Version you should check out this snippet: <?php if(version_compare(phpversion(), '4.1.0') == -1) { $_POST = &$HTTP_POST_VARS; $_GET = &$HTTP_GET_VARS; $_COOKIE = &$HTTP_COOKIE_VARS; $_REQUEST = array_merge($HTTP_COOKIE_VARS,$HTTP_POST_VARS,$HTTP_GET_VARS); } ?> Now, all the Superglobal variables are in every PHP-Version Have fun, LLCoolDannY (http://www.llcooldanny.de | http://source-builder.com | http://www.dragon-scripts.de) ---- Manual Page -- http://www.php.net/manual/en/function.version-compare.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45759 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45759&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45759&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76878) next »