> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 15 May 2007 16:48
> To: php-general@lists.php.net
> Subject: [PHP] PHP 5.2 array() == null
>
>
> Hi people
>
> i was just curios to ask whether
>
> array() == null should always return true. and then why
>
> i'm testing this with php 5.2.2
>
> greetings
>
> dominic letz
>

According to Table Q.2 at
http://www.php.net/manual/en/types.comparisons.php, array() == NULL will
always return TRUE.

Remember == is a loose comparison. I think this is a result of the
following:

      array() == FALSE  is TRUE (because it's empty?)
        FALSE == NULL   is TRUE
thus  array() == NULL   is TRUE

Edward

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to