I would like to try to change the formatting of fatal error but I can only modify the values of message, file and line.
I would expect to be able to change the css and the html of the message.
Thanks in advance.
I would like to try to change the formatting of fatal error but I can only modify the values of message, file and line.
I would expect to be able to change the css and the html of the message.
Thanks in advance.
Fatal errors in PHP are catchable, so you can make your own exception handler or even use a third party package like https://github.com/filp/whoops
You can catch fatal errors in PHP. Refer to this answer here:
https://stackoverflow.com/a/4410769/9051466
After determining if its a fatal error, you can just create a custom page, redirect the user to that custom page, then display what error message you want the user to see.