A neat way to have a place in code to control error reporting configuration :)
<?php
$errorsActive = [
E_ERROR => FALSE,
E_WARNING => TRUE,
E_PARSE => TRUE,
E_NOTICE => TRUE,
E_CORE_ERROR => FALSE,
E_CORE_WARNING => FALSE,
E_COMPILE_ERROR => FALSE,
E_COMPILE_WARNING => FALSE,
E_USER_ERROR => TRUE,
E_USER_WARNING => TRUE,
E_USER_NOTICE => TRUE,
E_STRICT => FALSE,
E_RECOVERABLE_ERROR => TRUE,
E_DEPRECATED => FALSE,
E_USER_DEPRECATED => TRUE,
E_ALL => FALSE,
];
error_reporting(
array_sum(
array_keys($errorsActive, $search = true)
)
);
?>