Skip to content

Instantly share code, notes, and snippets.

@peteboere
Created April 12, 2011 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peteboere/915197 to your computer and use it in GitHub Desktop.
Save peteboere/915197 to your computer and use it in GitHub Desktop.
Tailoring the $_REQUEST superglobal
<?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