分类:

使用 PHP 函数对变量 $x 进行比较
表达式 gettype() empty() is_null() isset() boolean : if($x)
$x = ""; string TRUE FALSE TRUE FALSE
$x = null; NULL TRUE TRUE FALSE FALSE
var $x; NULL TRUE TRUE FALSE FALSE
$x is undefined NULL TRUE TRUE FALSE FALSE
$x = array(); array TRUE FALSE TRUE FALSE
$x = false; boolean TRUE FALSE TRUE FALSE
$x = true; boolean FALSE FALSE TRUE TRUE
$x = 1; integer FALSE FALSE TRUE TRUE
$x = 42; integer FALSE FALSE TRUE TRUE
$x = 0; integer TRUE FALSE TRUE FALSE
$x = -1; integer FALSE FALSE TRUE TRUE
$x = "1"; string FALSE FALSE TRUE TRUE
$x = "0"; string TRUE FALSE TRUE FALSE
$x = "-1"; string FALSE FALSE TRUE TRUE
$x = "php"; string FALSE FALSE TRUE TRUE
$x = "true"; string FALSE FALSE TRUE TRUE
$x = "false"; string FALSE FALSE TRUE TRUE

最新文章

  1. DevExpress GridView属性说明
  2. Mysql 全文索引
  3. 数据仓库建模与ETL实践技巧
  4. 爬虫的自我解剖(抓取网页HtmlUnit)
  5. spark读取hdfs数据本地性异常
  6. Servlet中读取参数的几种方式
  7. poj 3778
  8. unable to create …
  9. Pycharm快捷键的使用
  10. 酷伯伯实时免费HTTP代理ip爬取(端口图片显示+document.write)
  11. idea配置tomcat运行按钮置灰,下拉没有自定义的tomcat选项
  12. 未能加载文件或程序集“System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项
  13. Integer类toString(int i,int radix)方法
  14. TeamViewer 安装
  15. Redux 笔记详解
  16. 获取TypeError:__init __()缺少1个需要的位置参数:'on_delete'当试图添加父表后面的子表
  17. C#字符串截取、获取当前电脑时间、判断输入日期对错 随手记
  18. linux系统分区表修复
  19. ThreadLocal模式与synchronized关键字的比较
  20. sql server 只读帐号设置能读取存储过程,view等内容。

热门文章

  1. [bzoj4712]洪水 线段树+树链剖分维护动态dp+二分
  2. 如何学习sql语言?
  3. [Scala随用随学] —— sealed声明的作用
  4. java使用Redis5--分布式存储
  5. jquery源码解析:jQuery队列操作queue方法实现的原理
  6. 挂载U盘到linux中
  7. git命令合集及github的克隆推送
  8. Git从码云或者Github 克隆代码到本地
  9. mysql5.7.20多实例编译安装
  10. P3292 [SCOI2016]幸运数字