== checks if two operands are equal or not. === checks the values, as well as the type of two operands.
if("1" == 1) echo "true"; else echo "false";
The above will print true .
if("1" === 1) echo "true"; else echo "false";
The above will output false .
if("1" === (string)1) echo "true"; else echo "false";
The above will print true .
source share