Skip to content

Instantly share code, notes, and snippets.

@aspyct
Created August 22, 2012 16:10
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aspyct/3427093 to your computer and use it in GitHub Desktop.
Save aspyct/3427093 to your computer and use it in GitHub Desktop.
The most undebuggable PHP snippet ever
<?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");
@theyann
Copy link

theyann commented Oct 14, 2015

my head hurts ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment