{"id":86,"date":"2008-02-21T16:11:41","date_gmt":"2008-02-21T14:11:41","guid":{"rendered":"http:\/\/www.hermione.de\/blog\/?p=86"},"modified":"2008-02-21T19:45:34","modified_gmt":"2008-02-21T17:45:34","slug":"true-false-null-und-php","status":"publish","type":"post","link":"http:\/\/blog.hermione.de\/?p=86","title":{"rendered":"TRUE, FALSE, NULL und &#8222;&#8220; [php]"},"content":{"rendered":"<h4>true oder false?<\/h4>\n<table class=\"rosa\">\n<tr>\n<th width=\"20%\">$v=<\/th>\n<th width=\"10%\">NULL<\/th>\n<th width=\"10%\">0<\/th>\n<th width=\"10%\">FALSE<\/th>\n<th width=\"10%\">&#8222;&#8220;<\/th>\n<th width=\"10%\">TRUE<\/th>\n<th width=\"10%\">unset($v)<\/th>\n<\/tr>\n<tr>\n<td>isset($v)<\/td>\n<td>false<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>if($v)<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>true<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>empty($v)<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>true<\/td>\n<td>false<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td>is_null($v)<\/td>\n<td>true<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>false<\/td>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td>print_r($v)<\/td>\n<td>&#8222;&#8220;<\/td>\n<td>0<\/td>\n<td>&#8222;&#8220;<\/td>\n<td>&#8222;&#8220;<\/td>\n<td>1<\/td>\n<td>&#8222;&#8220;<\/td>\n<\/tr>\n<\/table>\n<h4>== und ===<\/h4>\n<p>var_dump(0 == false); \/\/ Ausgabe bool(true)<br \/>\nvar_dump(0 === false); \/\/ Ausgabe bool(false)<\/p>\n<h4>var_dump($var) ergibt bool(false) bei:<\/h4>\n<p>$var = (bool)0;<br \/>\n$var = (bool)0.0;<br \/>\n$var = (bool)&#8220;0&#8243;;<br \/>\n$var = (bool)&#8220;&#8220;;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>true oder false? $v= NULL 0 FALSE &#8222;&#8220; TRUE unset($v) isset($v) false true true true true false if($v) false false false false true false empty($v) true true true true false true is_null($v) true false false false false true print_r($v) &#8222;&#8220; 0 &#8222;&#8220; &#8222;&#8220; 1 &#8222;&#8220; == und === var_dump(0 == false); \/\/ Ausgabe bool(true) var_dump(0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.hermione.de\/index.php?rest_route=\/wp\/v2\/posts\/86"}],"collection":[{"href":"http:\/\/blog.hermione.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.hermione.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.hermione.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.hermione.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86"}],"version-history":[{"count":0,"href":"http:\/\/blog.hermione.de\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.hermione.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.hermione.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.hermione.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}