Created
July 15, 2013 16:46
-
-
Save BlakeGardner/6001475 to your computer and use it in GitHub Desktop.
PHP SOMETHING challenge
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
Saw this interesting PHP Challenge. | |
Replace SOMETHING so that the output is Hello World. | |
if (SOMETHING) { | |
echo "Hello"; | |
} else { | |
echo "World"; | |
} | |
<?php | |
// solution | |
$hello = function() { echo "Hello "; return FALSE; }; | |
if($hello()) { | |
echo "Hello"; | |
} else { | |
echo "World"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment