Among $_REQUEST, $_GET and $_POST which one is the fastest?

后端 未结 15 2557
小鲜肉
小鲜肉 2020-11-22 05:04

Which of these code will be faster?

$temp = $_REQUEST[\'s\'];

or

if (isset($_GET[\'s\'])) {
  $temp = $_GET[\'s\'];
}
else          


        
15条回答
  •  野的像风
    2020-11-22 05:31

    Use REQUEST. Nobody cares about the speed of such a simple operation, and it's much cleaner code.

提交回复
热议问题