Create a custom error handler, and [man]set_error_handler/man ?
Then again, this should only add a fancy message, as no production server should have display_errors set to On ...
Another alternative to handle this specific problem would be to use [man]function_exists/man:
if(!function_exists('foo')) {
die('I slipped on a banana. Sorry!');
}