Created
June 2, 2020 13:31
-
-
Save daveh/7149c589457bf2c4dc537dff288ea675 to your computer and use it in GitHub Desktop.
Why you should use curly braces in conditionals and loops (code to accompany https://youtu.be/dsu0ooy2hnI)
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 ( ! file_exists("input.txt")) | |
exit; | |
*/ | |
/* | |
if ( ! file_exists("input.txt")) | |
echo "File not found\n"; | |
exit; | |
*/ | |
if ( ! file_exists("input.txt")) { | |
echo "File not found\n"; | |
exit; | |
} | |
print "File found ok, open for processing etc.\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment