Created
June 25, 2014 12:19
-
-
Save amyinorbit/a2a0f66ae27ab08fc2f1 to your computer and use it in GitHub Desktop.
Type conversion in php
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 | |
$a = ""; | |
var_dump(($a == null)); //outputs false | |
var_dump(($a === null)); //outputs true | |
var_dump(is_null($a)); //outputs true | |
$b; | |
var_dump(($b == null)); //outputs true | |
var_dump(($b === null)); //outputs true | |
var_dump(is_null($b)); //outputs true | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment