Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MrTrick
Last active August 22, 2016 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrTrick/8c5b77cfeae2735fc0ab06f676fd15ba to your computer and use it in GitHub Desktop.
Save MrTrick/8c5b77cfeae2735fc0ab06f676fd15ba to your computer and use it in GitHub Desktop.
WSOD generator, hair-tearing-inducer
<?
//Report EVERYTHING
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('log_errors',true);
ini_set('error_log','/home/mrtrick/php.log');
//Check the log file can be written
//error_log("TESTING");
//Bad code. Tssk.
function bad() {
//I'm in ur codebase, screwing your things up.
return nosuchfunc();
}
//Arguably worse.
echo @bad()."\n";
//This bit's fine, but too late.
function good() {
return "Foo";
}
echo @good()."\n";
?>Bar...
@MrTrick
Copy link
Author

MrTrick commented Aug 22, 2016

Outputs NOTHING.
Logs NOTHING.

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