https://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-e-error-error register_shutdown_function('__fatalHandler'); function __fatalHandler() { $error = error_get_last(); if($error) { echo '<pre>'; print_r($error); die; } } function debug($arr,$file='',$line=''){ if(empty($file) && empty($line) ){ $bt = debug_backtrace(); $caller = array_shift($bt); $file = $caller['file']; $line = $caller['line']; } echo "\n <b>debug file ".$file." line ".$line." </b>" ; echo "<pre>"; if(is_array($arr) || is_object($arr)){ print_r($arr); } elseif(is_string($arr) || is_numeric($arr)){ ...
Some tribes of the programmer clan.