Help us understand the problem. What is going on with this article?

$_GET, $_POST じゃなくて filter_input 使えとのこと

More than 5 years have passed since last update.

スーパーグローバル変数に直接アクセスするより、filter_input 経由したほうがいいとのこと。


// こう書くよりも
$aaa = isset( $_GET["aaa"] ) ? $_GET["aaa"] : null;
$bbb = isset( $_POST["bbb"] ) ? $_POST["bbb"] : null;

// こう書くほうがよいとのこと
$aaa = filter_input( INPUT_GET, "aaa" );
$bbb = filter_input( INPUT_POST, "bbb" );

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away