从PHP中的URL捕获变量值哪个最好,$ _GET或$ _REQUEST?

URL: http://stackcomplete.com?message=143

need to capture message variable value in PHP, i was confused which one is best $_GET or $_REQUEST

  1. $_GET['message']

or

  1. $_REQUEST['message']

Go with $_GET

$_REQUEST holds an associative array that by default contains the contents of $_GET, $_POST and $_COOKIE.

Since you know that the parameter will be URL based. $_GET will suffice.