Which of these code will be faster?
$temp = $_REQUEST[\'s\'];
or
if (isset($_GET[\'s\'])) {
$temp = $_GET[\'s\'];
}
else
I use this,
$request = (count($_REQUEST) > 1)?$_REQUEST:$_GET;
the statement validates if $_REQUEST has more than one parameter (the first parameter in $_REQUEST will be the request uri which can be used when needed, some PHP packages wont return $_GET so check if its more than 1 go for $_GET, By default, it will be $_POST.