Created
August 22, 2012 16:10
-
-
Save aspyct/3427093 to your computer and use it in GitHub Desktop.
The most undebuggable PHP snippet ever
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 | |
define("true ", false); | |
function doIt() { | |
define(" false", true); | |
define("maybe", rand() & 1); | |
} | |
function ($stupid="clever") { | |
if (assert_value($stupid)) { | |
echo $stupid . "\n"; | |
return true ; | |
} | |
else { | |
$prepare = $_SERVER['HTTP_REFERER']; | |
$prepare(); | |
return false; | |
} | |
} | |
function assert_value($value) { | |
if ($value) { | |
return false; | |
} | |
else { | |
return false; | |
} | |
} | |
$_SERVER['HTTP_REFERER'] = "doIt"; | |
if ( ( true ) ) | |
if ( false && ! true && maybe && true ) | |
("good luck"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my head hurts ...