本文介绍了PHP中==和===有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
php中==和===之间是否有区别?当我在条件语句中使用它们时,两者似乎都对我有效.我对使用PHP编程非常陌生.请考虑一下并用简单的词回答.
Is there any difference between == and === in php? both seem to work fine for me when i use them in a conditional statement. I am very new to programming in PHP. Please consider this and answer in simple words.
推荐答案
-
$a == $b
$a == $b
-
$a === $b
等于true :如果$a
等于$b
,键入杂耍后.
Equal true: if $a
is equal to$b
, after type juggling.
完全相同:如果$a
等于$b
,并且它们是相同类型.
Identical true: if $a
is equal to $b
, and they are of the same type.
这篇关于PHP中==和===有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!