ID: 39831
Updated by: [EMAIL PROTECTED]
Reported By: florian at in dot tum dot de
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: colder
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2006-12-14 11:40:26] florian at in dot tum dot de
Description:
------------
Correction:
-------------
the manual's comparison tables (appendix P) say that the loose
comparison between the EMPTY STRING and NULL evaluates to FALSE, but
actually this is not correct.
And therefore that evaluation does espacially not match the behavior of
is_null()...
is_null("") //=> FALSE
("" == NULL) //=> TRUE, not false
(I've tested it quite intensely, on linux as well as on windows,
different PHP versions etc.)
(btw., I've posted this issue as a note on the documentation page,
sorry for that. could any-one delet it, maybe? thanks.)
Reproduce code:
---------------
print( ("" == null) ? "true <br />" : "false <br />" );
print( (is_null("")) ? "true <br />" : "false <br />" );
Expected result:
----------------
false
false
Actual result:
--------------
true
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39831&edit=1