Is there a way to catch Fatal error in PHP?

Posted by Josef Sábl on Stack Overflow See other posts from Stack Overflow or by Josef Sábl
Published on 2010-04-27T11:46:22Z Indexed on 2010/04/27 11:53 UTC
Read the original article Hit count: 323

Filed under:
|
|

I have this line of PHP code:

thisFunctionDoesNotExist();

And it stops script execution with:

Fatal error: Call to undefined function

I tried using set_error_handler and it does help for warning type of errors. But not for fatal errors. As I understand it from various threads on internet it should be possible to handle by set_error_handler, but I cannot make it work.

Can you please post working example?

© Stack Overflow or respective owner

Related posts about php

Related posts about error-handling