Created
October 24, 2012 14:14
-
-
Save aalvesjr/3946284 to your computer and use it in GitHub Desktop.
True or False 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
| // Tudo FALSE | |
| if(null) | |
| echo 'NULL'; | |
| if(0) | |
| echo '0'; | |
| if(false) | |
| echo 'FALSE'; | |
| if("") | |
| echo 'VAZIO'; | |
| if(array()) | |
| echo 'ARRAY VAZIO'; | |
| // Tudo TRUE | |
| if(1) | |
| echo '<br/>UM'; | |
| if("qualquer coisa") | |
| echo '<br/>qualquer coisa'; | |
| if(0.75) | |
| echo '<br/>Floats'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment