ID: 38979 Updated by: [EMAIL PROTECTED] Reported By: killabee at bk dot ru -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux Red Hat, Windows 2000 PHP Version: 4.4.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2006-09-28 07:40:54] killabee at bk dot ru Description: ------------ Expresions like (NULL == 0) or (NULL == '') evaluate to TRUE. I doubt whether it is correct, but unambiguously it is inconvenient. If a variable $Var = 0 or $Var = '' then empty($Var) returns TRUE, while isset($Var) returns TRUE too. From the other side when $Var = NULL isset($Var) returns FALSE. From this point empty string with 0 and NULL are not the same. Moreover manual says "Also note that a NULL byte ("\0") is not equivalent to the PHP NULL constant." So why NULL is equal to 0 and '' then? NULL means that variable has no value in php context or in other words is unset. So, I guess that check like $Var == NULL must has the same meaning like !isset($Var). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38979&edit=1