|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-14 16:45 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 13 05:00:02 2026 UTC |
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