+ 1
Please explain
If(0==='abc' ) { Echo 'true'; } Help
2 Answers
+ 6
If 0 is of the same value and type as abc then it will echo true, if not it will show no output. So, it shows no output as 0 is not of the same value and type as abc.
+ 2
=== is used for strict comparison. meaning the data type and value has to be the same for it to be true.
in the example it strictly compares 0 which is (int) to 'abc' which is (string)
so it's false, neither the data type nor the value are equal.
it prints nothing.
//Echo has to be echo.