Development

Showing all errors, warnings, notices…

Why would you like to show all errors, warnings, notices, etc? Well, this is the first and easiest way to debug your PHP script. Of course there is a bunch of scripts and debug tools out there, but we do not need sledgehammer to crack a nut, don’t we?
So, first thing is to turn this on on your local or staging server.
Second thing, but even more important!, is to turn it off on your production server!
You don’t want your users to see what is wrong this way.
OK, let’s go to code:

And that’s all!


Of course you may need it more complicated way. Something like:

Leave a Reply

Your email address will not be published. Required fields are marked *