debug PHP for the newbies in error logs with execution time

/ Published in: PHP
Save to your folder(s)

I'm originally a sys admin and i love "tail - f /var/log/*" ... so i created a similar function in PHP that will allow me to view in real time what classes/functions/files/lines of my code is being run...

The usage is really simple, just set a global variable "debug" to true/false...
Note: The usage of this function will slow down your script... use it only to debug. Turn it off on production.

to view the logs, go to your default php error log file. Enjoy!

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.