Created
April 12, 2011 08:49
-
-
Save peteboere/915197 to your computer and use it in GitHub Desktop.
Tailoring the $_REQUEST superglobal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* In PHP >= 5.3 ini files you can detemine which of $_COOKIE, $_POST, $_GET variables appear in the | |
* $_REQUEST superglobal, and the order of precedence in the event of naming collisions. | |
* | |
* The following snippet simulates this for versions of PHP < 5.3 | |
*/ | |
$_REQUEST = array_merge( $_GET, $_POST ); // POST overrides GET in name clashes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment