Last active
August 29, 2015 14:07
-
-
Save DiegoSeC/7e17939dd00cb6a11feb to your computer and use it in GitHub Desktop.
This file contains 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 | |
// Returns the value of the expression, take care if you use isset or some function who evaluate the variable | |
// because will return true or the response of the function. | |
$x = "Hey"; | |
echo $x ?: "The variable doesn't exist"; | |
echo (isset($y) ?: "The variable doesn't exist"); | |
$z = "This will return TRUE instead of this sentence"; | |
echo (isset($z) ?: "The variable doesn't exist"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment