PHP empty()
2015-08-07 13:52
531 查看
PHP 中哪些情况是空的呢
The following things are considered to be empty:
“” (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
“0” (0 as a string)
NULL
FALSE
array() (an empty array)
var $var; (a variable declared, but without a value in a class)
The following things are considered to be empty:
“” (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
“0” (0 as a string)
NULL
FALSE
array() (an empty array)
var $var; (a variable declared, but without a value in a class)
[code]$a = 0; if (empty($a)){ echo "a is empty"; }
相关文章推荐
- PHP 常用函数
- Yii: gii 403 Error you are not allowed to access this page
- PHPCMS 利用联动菜单实现分类筛选功能
- 使用newLISP由SMTPserver发送电子邮件
- php AES加密兼容.net
- PHP中使用curl伪造IP的简单方法
- PHP 处理高并发问题
- PHP 实现文件强制下载
- PHP的array_map函数使用类内部方法作为回调函数的实现方式
- 【细说PHP学习】第十八章 MySQL数据表的设计
- ThinkPHP学习笔记( 一)安装配置
- php静态文件配置
- 生成MySQL数据字典的PHP脚本
- mountpoint
- php生成随机密码的几种方法
- (转)PHP中extract()函数的妙用
- 39. Element compareDocumentPosition() 方法
- yii2 多数据库操作
- 学PHP那点事?
- 如何在php配置xcache