through error on warning php

Solutions on MaxInterview for through error on warning php by the best coders in the world

showing results for - "through error on warning php"
Jessica
01 Nov 2019
1function exception_error_handler($severity, $message, $file, $line) {
2    if (!(error_reporting() & $severity)) {
3        // This error code is not included in error_reporting
4        return;
5    }
6    throw new ErrorException($message, 0, $severity, $file, $line);
7}
8set_error_handler("exception_error_handler");