Re: Bug in == comparison?

From: Date: Fri, 21 Jul 2006 16:47:26 +0000
Subject: Re: Bug in == comparison?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239685@lists.php.net to get a copy of this message
I tried comparing in the reverse sequence ($test2==$test) and the same occurred. It does work as expected if I have === but the rest of the scirpt isn't type sensitive so I want NULL, 0, and empty string to still maintain equality.
Wups, I missed the last part there. You want the empty() function: http://www.php.net/manual/en/function.empty.php It can do exactly what you want. Regards, Adam.

« previous php.general (#239685) next »