Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (23 sloc) 718 Bytes
<?php
/** @noinspection PhpHierarchyChecksInspection */
ini_set('display_errors', false);
set_error_handler(function (int $level, string $message, string $file, int $line) {
if (error_reporting() === 0) {
return;
}
throw new ErrorException($message, 0, $level, $file, $line);
});
register_shutdown_function(function () {
$lastError = error_get_last();
if ($lastError !== NULL) {
throw new ErrorException($lastError['message'], 0, $lastError['type'], $lastError['file'],
$lastError['line']);
}
});
interface foo
{
public function bar();
}
class baz implements foo
{
}
You can’t perform that action at this time.