Skip to content

Instantly share code, notes, and snippets.

@nplusp
Forked from aspyct/workaround.php
Created December 29, 2015 06:39
Show Gist options
  • Save nplusp/b386d3cadf718858e1c9 to your computer and use it in GitHub Desktop.
Save nplusp/b386d3cadf718858e1c9 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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment