Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class test {
public static function error_handler($code, $error, $file = NULL, $line = NULL)
{
throw new ErrorException($error, $code, 0, $file, $line);
}
public static function run()
{
$object = new self;
echo $object.$foo;
}
public function __toString()
{
return __CLASS__;
}
}
error_reporting(E_ALL);
set_error_handler(array('test', 'error_handler'));
test::run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment