Skip to content

Instantly share code, notes, and snippets.

@shadowhand
Created June 20, 2009 22:00
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 shadowhand/133305 to your computer and use it in GitHub Desktop.
Save shadowhand/133305 to your computer and use it in GitHub Desktop.
<?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