filp/whoops ? reverse-engineered prompt
Reverse engineered prompt
I'm tired of the default PHP error pages. They're ugly and don't give you much to work with. Can you build me a modern error handling library for PHP that I can drop into any project?
When an exception happens in development, I want it to display a beautiful, detailed error page instead of the default one. This page should show me the exception message, the full stack trace, and the exact code snippet where the error occurred, with syntax highlighting. It should also display all the superglobals like session data, request info, and server variables in an easy-to-read format.
A key feature is that for API calls, it should be smart enough to return the error as a JSON or XML response instead of HTML. It needs to be a standalone library that can be installed with Composer and easily registered in a project. Let's make debugging PHP a better experience.
Are you gonna build this?
make sure you review the code using coderabbit