Does PHP negation check with `!` coprrespond to `!=` or to `!==`?

后端 未结 4 681
梦如初夏
梦如初夏 2021-01-27 18:34

In PHP, is

if(!$foo)

equivalent with

if($foo != true)

or with

if($foo !== true)
4条回答
  •  感动是毒
    2021-01-27 19:15

    Its not the same

    != is No equal (Returns true if  is not equal)
    !== is Not identical  (Returns true if  is not equal , or they are not of the same type)
    

提交回复
热议问题