You are here: Re: diff between $x == null and is_null($x) « PHP Programming Language « IT news, forums, messages
Re: diff between $x == null and is_null($x)

Posted by ljb on 09/18/07 00:53

doannoahlot@dis.org wrote:
> Is there a meaningful/usefull difference
> 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация