Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. declare(strict_types=1);
  4.  
  5. error_reporting(E_ALL);
  6.  
  7. set_error_handler(function ($severity, $message, $file, $line) {
  8. if (!(error_reporting() & $severity)) {
  9. // This error code is not included in error_reporting
  10. return;
  11. }
  12. throw new \ErrorException($message, 0, $severity, $file, $line);
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement