What is the difference between == and === in PHP?
- A === compares value and type; == coerces types before comparing
- B == compares references
- C === only works on integers
- D They are identical
Answer
=== compares value and type; == coerces types before comparing
Loose comparison against user input has caused real authentication bypasses. Use === by default and hash_equals for tokens.





