Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
To get the full control of the error output (or, rather, of the error message handling) I would suggest to use an exception handling function, set_exception_handler() I've got an example in my article on PHP error reporting. There, instead of just spitting out the raw exception, you can use the Exception class methods to get the relevant parts and either log or echo them out, depends on the server role. Or you can even include a library like Whoops that dramatically improves the output.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.
Related posts
- error: there's a bug in your code
- Does anyone know of a Go library that provides "helpful" error pages for web apps?
- Computer crash with a debug console in a Danish public bus.
- I hate PHP development
- spatie/ignition is now framework agnostic and can be used as your local error handler in any PHP project