LoginSignup
5
3

More than 5 years have passed since last update.

isset(), empty()の動作

Posted at

判定結果一覧

isset() empty()
未定義 false true
NULL false true
false true true
空文字("") true true
0 true true
"0" true true
空の配列 true true

isset()

変数がセットされていること
そしてNULLではないことを検査する

empty()

変数が空であるかどうかを検査する
5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3