当前位置:网站首页>PHP中 比较 0、false、null,‘‘ “
PHP中 比较 0、false、null,‘‘ “
2022-07-31 07:08:00 【金色%夕阳】
PHP中 比较 0、false、null,'' "
松散比较:使用两个等号 == 比较,只比较值,不比较类型。
严格比较:用三个等号 === 比较,除了比较值,也比较类型。
== 在进行比较的时候,会先将字符串类型转化成相同,再比较
0 == false: bool(true)
0 === false: bool(false)
0 == null: bool(true)
0 === null: bool(false)
false == null: bool(true)
false === null: bool(false)
"0" == false: bool(true)
"0" === false: bool(false)
"0" == null: bool(false)
"0" === null: bool(false)
"" == false: bool(true)
"" === false: bool(false)
"" == null: bool(true)
"" === null: bool(false)



边栏推荐
猜你喜欢

2022.07.24_每日一题

Thread 类的基本用法——一网打尽

Client navicat installation tutorial

【愚公系列】2022年07月 Go教学课程 022-Go容器之字典

电脑开机密码怎么设置?如何给你的电脑加上“安全锁”
![[PSQL] SQL基础教程读书笔记(Chapter1-4)](/img/76/d416f79b7f2c93c1c79a285c30d3e6.png)
[PSQL] SQL基础教程读书笔记(Chapter1-4)
![Embedded system driver primary [2] - _ parameters and dependencies under the kernel module](/img/c2/22c1e087b92ed2c898f97bcf0e818b.png)
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
解决win11/win10在登陆界面(解锁界面)点击获取每日壁纸无效的问题 - get Daily Lockscreen and Wallpaper - Win11/10的登录界面背景图片在哪里?

NK-RTU980烧写裸机程序

CNN--各层的介绍
随机推荐
Navicat new database
The Perfect Guide|How to use ODBC for Agentless Oracle Database Monitoring?
2022.07.18_每日一题
初识NK-RTU980开发板
第9章 异常try...except...else...finally
2022.07.22 _ a day
CY7C68013A之LED闪烁
MySQL installation to the last step in the write the configuration file failed?And after the installation steps
【微服务】Nacos集群搭建以及加载文件配置
NK-RTU980烧写裸机程序
Yu Mr Series 】 【 2022 July 022 - Go Go teaching course of container in the dictionary
Reimbursement Process | By Tianfang
Zabbix6.2惊喜发布!特别优化中大型环境部署的性能!
Introduction and self-order of bcos
MySql数据库优化查询工具
报销流程|By天放师兄
《C语言小游戏》扫雷
bcos简介及自序
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
进程调度的基本过程