Typical Lazy PHP Programmer
That’s me, write a program and it works, don’t bother initializing variables, etc. That was until I moved to a new host that had display errors turned off. It is pretty much impossible to debug without errors being displayed so I went rummaging around for ways around this and found the following code:
error_reporting(E_ALL);
ini_set(“display_errors”,1);
I turned this on and suddenly the code was spitting out warnings and messages all over the place. Some trivial but some really fixed issues that I didn’t know. Now I’ve got it turned on all the time in development and on internal systems.
As the ‘Practical PHP Programming’ manual says:
Always set your PHP error level to the most verbose level, E_ALL.… Read the rest