Is it possible to have PHP stop execution upon a notice/warning, globally?
We run a development server with a lot of sites on, but want to force our developers to fi
As of PHP 5.3.0:
set_error_handler(
function(int $nSeverity, string $strMessage, string $strFilePath, int $nLineNumber){
if(error_reporting()!==0) // Not error suppression operator @
throw new \ErrorException($strMessage, /*nExceptionCode*/ 0, $nSeverity, $strFilePath, $nLineNumber);
},
/*E_ALL*/ -1
);