Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- diff between $x == null and is_null($x)
- Doan Noahlot
September 18, 2007, 12:26 am
rate this thread
Re: diff between $x == null and is_null($x)
Yes there is.
is_null($x) is the same as $x === NULL (3 equal signs for strict
compare). But $x == NULL (2 equal signs for loose compare) is also
true if $x is 0, FALSE, empty string, or empty array. is_null() is false
for all those.
See the Appendix R "PHP Type Comparison Tables" of the PHP manual.