I have used:
ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL);
at the beginning of my code. However, the error messages are displayed directly in the output (there are a lot of them, so you can't find the errors very well).
After the script is loaded, how to display all errors that occurred?
You can use error/exception handlers with destructors. The handler catches the error and the destructor will display the caught error at the very bottom of the page.