856
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

PHP isset, empty, is_null の違い早見表

PHP isset, empty, is_null の違い早見表

if($var) isset empty is_null
$var=1 true true false false
$var=""; false true true false
$var="0"; false true true false
$var=0; false true true false
$var=NULL; false false true true
$var false false true true
$var=array() false true true false
$var=array(1) true true false false

引用

参考リンク

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
Sign upLogin
856
Help us understand the problem. What are the problem?