Created
April 27, 2015 17:37
-
-
Save bradhe/addcd3ceb48a61eb1299 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 | |
echo "Empty array false-y? " . (array() ? "No" : "Yes"); | |
echo "\n"; | |
echo "Array false-y? " . (array("hi") ? "No" : "Yes"); | |
echo "\n"; | |
echo "Associative array false-y? " . (array("hi" => "there") ? "No" : "Yes"); | |
echo "\n"; |
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
bheller@~ ☁ [ruby-2.2.2] [2015-04-27 10:37:11] [1] | |
>> php falsy.php | |
Empty array false-y? Yes | |
Array false-y? No | |
Associative array false-y? No |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment