ZERO TEST2
$var = 0
------------
$var is 0
$var==0
$var===0
$var=="0"
$var!=="0"
!$var
$var==""
empty($var)
$var!==""
$var==null
$var!==null
$var=="null"
$var!=="null"
$var==false
$var!==false
$var=="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = '0'
------------
$var is 0
$var==0
$var!==0
$var=="0"
$var==="0"
!$var
empty($var)
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var==false
$var!==false
$var!="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = "0"
------------
$var is 0
$var==0
$var!==0
$var=="0"
$var==="0"
!$var
empty($var)
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var==false
$var!==false
$var!="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = ''
------------
$var is
$var==0
$var!==0
$var!="0"
$var!=="0"
!$var
$var==""
$var===""
!isset($var) || $var===""
(!isset($var) && $var!==null) || $var===""
empty($var)
empty($var) && $var!==0 && $var!=="0" && $var!==null && $var!==false
$var==null
$var!==null
$var!="null"
$var!=="null"
$var==false
$var!==false
$var!="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = ""
------------
$var is
$var==0
$var!==0
$var!="0"
$var!=="0"
!$var
$var==""
$var===""
!isset($var) || $var===""
(!isset($var) && $var!==null) || $var===""
empty($var)
empty($var) && $var!==0 && $var!=="0" && $var!==null && $var!==false
$var==null
$var!==null
$var!="null"
$var!=="null"
$var==false
$var!==false
$var!="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = null
------------
$var is
$var==0
$var!==0
$var!="0"
$var!=="0"
!$var
$var==""
!isset($var) || $var===""
empty($var)
$var!==""
$var==null
$var===null
$var!="null"
$var!=="null"
$var==false
$var!==false
$var!="false"
$var!=="false"
!isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = 'null'
------------
$var is null
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var=="null"
$var==="null"
$var!=false
$var!==false
$var!="false"
$var!=="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = "null"
------------
$var is null
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var=="null"
$var==="null"
$var!=false
$var!==false
$var!="false"
$var!=="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = false
------------
$var is
$var==0
$var!==0
$var=="0"
$var!=="0"
!$var
$var==""
empty($var)
$var!==""
$var==null
$var!==null
$var!="null"
$var!=="null"
$var==false
$var===false
$var!="false"
$var!=="false"
isset($var)
empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = 'false'
------------
$var is false
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var!=false
$var!==false
$var=="false"
$var==="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = "false"
------------
$var is false
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var!=false
$var!==false
$var=="false"
$var==="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = true
------------
$var is 1
$var!=0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var=="null"
$var!=="null"
$var!=false
$var!==false
$var=="false"
$var!=="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = 'true'
------------
$var is true
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var!=false
$var!==false
$var!="false"
$var!=="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
$var = "true"
------------
$var is true
$var==0
$var!==0
$var!="0"
$var!=="0"
$var
$var!=""
$var!==""
$var!=null
$var!==null
$var!="null"
$var!=="null"
$var!=false
$var!==false
$var!="false"
$var!=="false"
isset($var)
!empty($var)
$nonset==0
$nonset!==0
$nonset!="0"
$nonset!=="0"
!$nonset
$nonset==""
!isset($nonset) || $nonset===""
empty($nonset)
$nonset!==""
$nonset==null
$nonset===null
$nonset!="null"
$nonset!=="null"
$nonset==false
$nonset!==false
$nonset!="false"
$nonset!=="false"
!isset($nonset)
empty($nonset)
function test($var){ $mes = "
\n------------
\n" . '$var is ' . $var . "
\n"; //------------ if($var==0){ $mes .= '$var==0' . "
\n"; } if($var===0){ $mes .= '$var===0' . "
\n"; } if($var!=0){ $mes .= '$var!=0' . "
\n"; } if($var!==0){ $mes .= '$var!==0' . "
\n"; } //------------ if($var=="0"){ $mes .= '$var=="0"' . "
\n"; } if($var==="0"){ $mes .= '$var==="0"' . "
\n"; } if($var!="0"){ $mes .= '$var!="0"' . "
\n"; } if($var!=="0"){ $mes .= '$var!=="0"' . "
\n"; } //------------ if($var){ $mes .= '$var' . "
\n"; } if(!$var){ $mes .= '!$var' . "
\n"; } //------------ if($var==""){ $mes .= '$var==""' . "
\n"; } if($var===""){ $mes .= '$var===""' . "
\n"; } if(!isset($var) || $var===""){ $mes .= '!isset($var) || $var===""' . "
\n"; } if((!isset($var) && $var!==null) || $var===""){ $mes .= '(!isset($var) && $var!==null) || $var===""' . "
\n"; } if(empty($var)){ $mes .= 'empty($var)' . "
\n"; } if(empty($var) && $var!==0 && $var!=="0" && $var!==null && $var!==false){ $mes .= 'empty($var) && $var!==0 && $var!=="0" && $var!==null && $var!==false' . "
\n"; } if($var!=""){ $mes .= '$var!=""' . "
\n"; } if($var!==""){ $mes .= '$var!==""' . "
\n"; } //------------ if($var==null){ $mes .= '$var==null' . "
\n"; } if($var===null){ $mes .= '$var===null' . "
\n"; } if($var!=null){ $mes .= '$var!=null' . "
\n"; } if($var!==null){ $mes .= '$var!==null' . "
\n"; } if($var=="null"){ $mes .= '$var=="null"' . "
\n"; } if($var==="null"){ $mes .= '$var==="null"' . "
\n"; } if($var!="null"){ $mes .= '$var!="null"' . "
\n"; } if($var!=="null"){ $mes .= '$var!=="null"' . "
\n"; } //------------ if($var==false){ $mes .= '$var==false' . "
\n"; } if($var===false){ $mes .= '$var===false' . "
\n"; } if($var!=false){ $mes .= '$var!=false' . "
\n"; } if($var!==false){ $mes .= '$var!==false' . "
\n"; } if($var=="false"){ $mes .= '$var=="false"' . "
\n"; } if($var==="false"){ $mes .= '$var==="false"' . "
\n"; } if($var!="false"){ $mes .= '$var!="false"' . "
\n"; } if($var!=="false"){ $mes .= '$var!=="false"' . "
\n"; } //------------ if( isset($var) ){ $mes .= 'isset($var)' . "
\n"; } if( !isset($var) ){ $mes .= '!isset($var)' . "
\n"; } if(empty($var)){ $mes .= 'empty($var)' . "
\n"; } if(!empty($var)){ $mes .= '!empty($var)' . "
\n"; } //------------ //------------ if($nonset==0){ $mes .= '$nonset==0' . "
\n"; } if($nonset===0){ $mes .= '$nonset===0' . "
\n"; } if($nonset!=0){ $mes .= '$nonset!=0' . "
\n"; } if($nonset!==0){ $mes .= '$nonset!==0' . "
\n"; } //------------ if($nonset=="0"){ $mes .= '$nonset=="0"' . "
\n"; } if($nonset==="0"){ $mes .= '$nonset==="0"' . "
\n"; } if($nonset!="0"){ $mes .= '$nonset!="0"' . "
\n"; } if($nonset!=="0"){ $mes .= '$nonset!=="0"' . "
\n"; } //------------ if($nonset){ $mes .= '$nonset' . "
\n"; } if(!$nonset){ $mes .= '!$nonset' . "
\n"; } //------------ if($nonset==""){ $mes .= '$nonset==""' . "
\n"; } if($nonset===""){ $mes .= '$nonset===""' . "
\n"; } if(!isset($nonset) || $nonset===""){ $mes .= '!isset($nonset) || $nonset===""' . "
\n"; } if((!isset($nonset) && $nonset!==null) || $nonset===""){ $mes .= '(!isset($nonset) && $nonset!==null) || $nonset===""' . "
\n"; } if(empty($nonset)){ $mes .= 'empty($nonset)' . "
\n"; } if(empty($nonset) && $nonset!==0 && $nonset!=="0" && $nonset!==null && $nonset!==false){ $mes .= 'empty($nonset) && $nonset!==0 && $nonset!=="0" && $nonset!==null && $nonset!==false' . "
\n"; } if($nonset!=""){ $mes .= '$nonset!=""' . "
\n"; } if($nonset!==""){ $mes .= '$nonset!==""' . "
\n"; } //------------ if($nonset==null){ $mes .= '$nonset==null' . "
\n"; } if($nonset===null){ $mes .= '$nonset===null' . "
\n"; } if($nonset!=null){ $mes .= '$nonset!=null' . "
\n"; } if($nonset!==null){ $mes .= '$nonset!==null' . "
\n"; } if($nonset=="null"){ $mes .= '$nonset=="null"' . "
\n"; } if($nonset==="null"){ $mes .= '$nonset==="null"' . "
\n"; } if($nonset!="null"){ $mes .= '$nonset!="null"' . "
\n"; } if($nonset!=="null"){ $mes .= '$nonset!=="null"' . "
\n"; } //------------ if($nonset==false){ $mes .= '$nonset==false' . "
\n"; } if($nonset===false){ $mes .= '$nonset===false' . "
\n"; } if($nonset!=false){ $mes .= '$nonset!=false' . "
\n"; } if($nonset!==false){ $mes .= '$nonset!==false' . "
\n"; } if($nonset=="false"){ $mes .= '$nonset=="false"' . "
\n"; } if($nonset==="false"){ $mes .= '$nonset==="false"' . "
\n"; } if($nonset!="false"){ $mes .= '$nonset!="false"' . "
\n"; } if($nonset!=="false"){ $mes .= '$nonset!=="false"' . "
\n"; } //------------ if( isset($nonset) ){ $mes .= 'isset($nonset)' . "
\n"; } if( !isset($nonset) ){ $mes .= '!isset($nonset)' . "
\n"; } if(empty($nonset)){ $mes .= 'empty($nonset)' . "
\n"; } if(!empty($nonset)){ $mes .= '!empty($nonset)' . "
\n"; } //------------ $mes .= "
\n"; return $mes; } $var = 0; echo test($var); $var = '0'; echo test($var); $var = "0"; echo test($var); $var = ''; echo test($var); $var = ""; echo test($var); $var = null; echo test($var); $var = 'null'; echo test($var); $var = "null"; echo test($var); $var = false; echo test($var); $var = 'false'; echo test($var); $var = "false"; echo test($var); $var = true; echo test($var); $var = 'true'; echo test($var); $var = "true"; echo test($var);