http://php.net/manual/en/function.error-get-last.php
Ever have a PHP error on production server, but it’s a hassle to turn on error reporting? Now, you might not have to. Just var_dump(get_last_error()); and you get an array containing the last PHP error, the file and the line.