Created
July 22, 2013 06:18
-
-
Save kentaro/6051659 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ("") { | |
echo "んなわけねーじゃん"; | |
} else { | |
echo "空文字はFALSEとして評価される"; | |
} | |
if ("" == FALSE) { | |
echo "空文字はFALSEとして評価される"; | |
} else { | |
echo "んなわけねーじゃん"; | |
} | |
if ("" === FALSE) { | |
echo "空文字とFALSEは同じ"; | |
} else { | |
echo "んなわけねーじゃん"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment