
{"id":6822,"date":"2018-02-24T12:37:27","date_gmt":"2018-02-24T03:37:27","guid":{"rendered":"https:\/\/tetraup.com\/news_topics\/archives\/6822"},"modified":"2024-09-11T11:39:20","modified_gmt":"2024-09-11T02:39:20","slug":"php-isset-empty-is_null","status":"publish","type":"post","link":"https:\/\/tetraup.com\/news_topics\/column\/php-isset-empty-is_null\/","title":{"rendered":"[PHP] isset\u3001empty\u3001is_null\u95a2\u6570\u306e\u6319\u52d5\u307e\u3068\u3081"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"700\" src=\"https:\/\/tetraup.com\/news_topics\/wp-content\/uploads\/2018\/02\/PHP-isset\u3001empty\u3001is_null\u95a2\u6570\u306e\u6319\u52d5\u307e\u3068\u3081.png\" alt=\"[PHP] isset\u3001empty\u3001is_null\u95a2\u6570\u306e\u6319\u52d5\u307e\u3068\u3081\" class=\"wp-image-9352\"\/><\/figure>\n\n\n<p>php\u3067\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u8abf\u3079\u308b\u95a2\u6570\u306bisset, empty, is_null\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3069\u308c\u304c\u3069\u306e\u3088\u3046\u306b\u5224\u5b9a\u3055\u308c\u308b\u306e\u304b\u3001\u8ff7\u3046\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u4e00\u89a7\u306b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<style>\n.table20180224 {<br \/>\nborder: #c7c7c7 solid 2px;<br \/>\nwidth: 100%;<br \/>\nborder-collapse: collapse;<br \/>\nmargin-bottom:80px;<br \/>\n}<br \/>\n.table20180224 th {<br \/>\nbackground: #f7f7f7;}<br \/>\n.table20180224 th,<br \/>\n.table20180224 td {<br \/>\nborder: #c7c7c7 solid 1px;<br \/>\ntext-align:center;<br \/>\npadding:10px 0;<br \/>\n}<br \/>\n.table20180224 td.false {<br \/>\ncolor:#fa3145;<br \/>\n}<br \/>\n.table20180224 td.true {<br \/>\ncolor:#1940ff;<br \/>\n}<br \/>\n.table20180224 th span {<br \/>\ncolor: #ff910b;<br \/>\nfont-size: 115%;<br \/>\nwidth: 120px;<br \/>\ndisplay: inline-block;<br \/>\n}<br \/>\n<\/style>\n<table class=\"table20180224\">\n<tbody>\n<tr>\n<th><\/th>\n<th>isset<\/th>\n<th>empty<\/th>\n<th>is_null<\/th>\n<\/tr>\n<tr>\n<th>$var<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;hoge&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = 1<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0.0<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0.1<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;1&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0.0&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0.1&#8221;<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = TRUE<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = FALSE<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = NULL<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = array()<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = array(1,2)<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3067\u3001\u8ad6\u7406\u6f14\u7b97\u5b50\u306e\u5426\u5b9a\u300c\uff01\u300d\u3092\u4ed8\u4e0e\u3059\u308b\u3068\u5f53\u7136\u306a\u304c\u3089\u6b63\u53cd\u5bfe\u306e\u7d50\u679c\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<table class=\"table20180224\">\n<tbody>\n<tr>\n<th><\/th>\n<th>!isset<\/th>\n<th>!empty<\/th>\n<th>!is_null<\/th>\n<\/tr>\n<tr>\n<th>$var<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;hoge&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = 1<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0.0<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = 0.1<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;1&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0.0&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = &#8220;0.1&#8221;<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = TRUE<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = FALSE<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = NULL<\/th>\n<td class=\"true\">TRUE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<\/tr>\n<tr>\n<th>$var = array()<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<tr>\n<th>$var = array(1,2)<\/th>\n<td class=\"false\">FALSE<\/td>\n<td class=\"true\">TRUE<\/td>\n<td class=\"true\">TRUE<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u306a\u304b\u306a\u304b\u3084\u3084\u3053\u3057\u3044\u3067\u3059\u306d\uff01<\/p>","protected":false},"excerpt":{"rendered":"<p>php\u3067\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u8abf\u3079\u308b\u95a2\u6570\u306bisset, empty, is_null\u304c\u3042\u308a\u307e\u3059\u3002 \u3069\u308c\u304c\u3069\u306e\u3088\u3046\u306b\u5224\u5b9a\u3055\u308c\u308b\u306e\u304b\u3001\u8ff7\u3046\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u4e00\u89a7\u306b\u3057\u3066\u307f\u307e\u3059\u3002 isset empty is_null $var FALS [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":9352,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[37],"tags":[],"class_list":["post-6822","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/comments?post=6822"}],"version-history":[{"count":2,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6822\/revisions"}],"predecessor-version":[{"id":9353,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/posts\/6822\/revisions\/9353"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/media\/9352"}],"wp:attachment":[{"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/media?parent=6822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/categories?post=6822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tetraup.com\/news_topics\/wp-json\/wp\/v2\/tags?post=6822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}