What is the difference between == and === operator in PHP ?

devquora
devquora

Posted On: Apr 15, 2024

 

    1 Answer Written

  •  devquora
    Answered by Angelina Jones

    == checks for same value and === checks for same value and same datatype for ex 123==123 returns true 123=='123' returne true 123===123 returns true 123==='123' returns false because one is integer datatype and another is string data type

Related Questions

Please Login or Register to leave a response.

Related Questions

PHP Interview Questions

What is T_PAAMAYIM_NEKUDOTAYIM in PHP?

T_PAAMAYIM_NEKUDOTAYIM is scope resolution operator used as :: (double colon) .Basically, it used to call static methods/variables of a Class...

PHP Interview Questions

What is session in PHP. How to remove data from a session?

What is session in PHP. How to remove data from a session?..