D’oh. Still a PHP noob after all…

Despite NULL and FALSE meaning different things – they’re equal in PHP if you’re not type matching.

if ( NULL == false) {
	echo "NULL equates to false" ;
} else {
	echo "Nu-huh" ;
}
if ( NULL === false) {
	echo "Nu-huh" ;
} else {
	echo "NULL is not identical to false" ;
}

ref http://stackoverflow.com/

Last Updated on