PHP中空字符串、0、null、empty、和false之间的关系
欢迎来到天天文库
浏览记录
ID:57695641
大小:25.03 KB
页数:5页
时间:2020-09-01
《PHP中空字符串、0、null、empty、和false之间的关系.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、
2、se{echo"strval(0)!=''";}echo"";if($a===''){echo"0===''";}else{echo"0!===''";}echo"";if(empty($a)){echo"0isempty";}else{echo"0isnotempty";}echo"";if(is_null($a)){echo"0isnull";}else{echo"0isnotnull";}echo"";if(is_numeric($a)){echo"0isnumeric";}else{echo"0isnotnumeric";}echo"<
3、br>";if(is_string($a)){echo"0isstring";}else{echo"0isnotstring";}echo"";if(!$a){echo"0isfalse";}else{echo"0isnotfalse";}echo"";echo"";echo'--------------------';?>
4、val($a)==0){echo"intval('')==0";}else{echo"intval('')!=0";}echo"";if(empty($a)){echo"''isempty";}else{echo"''isnotempty";}echo"";if(is_null($a)){echo"''isnull";}else{echo"''isnotnull";}echo"";if(is_numeric($a)){echo"''isnumeric";}else{echo"''isnotnumeric";}echo"";if(is_strin
5、g($a)){echo"''isstring";}else{echo"''isnotstring";}echo"";if(!$a){echo"''isfalse";}else{echo"''isnotfalse";}echo"";echo"";echo"";echo"";echo'--------------------';?>
6、;}echo"";if($a==0){echo"null==0";}else{echo"null!=0";}echo"";if($a===''){echo"null===''";}else{echo"null!===''";}echo"";if($a===0){echo"null===0";}else{echo"null!===0";}echo"";if(strval($a)==''){echo"strval(null)==''";}else{echo"strval(null)!=''";}echo"";if(intval($a)==0
7、){echo"intval(null)==0";}else{echo"intval(null)!=0";}echo"";if(empty($a)){echo"nullisempty";}else{echo"nullisnotempty";}echo"";if(is_numeric($a)){echo"nullisnumeric";}else{echo"nullisnotnumeric";}echo"";if(is_string($a)){echo"nullisstring";}e
此文档下载收益归作者所有