php web console - Debugging PHP in browser’s Javascript console

Debugging PHP in browser’s Javascript console

Posted on

php web console - Debugging PHP in browser’s Javascript consolePHP is a server aspect scripting language used to develop dynamic internet software. One of many limitation of PHP I see as evaluate to java is not like java, php doesn’t have an excellent server aspect debugging characteristic. All we will do for debugging in PHP us simply add some echo, var_dump and so on statements that may present variable, array values on browser display screen.

Everyone knows that at the moment’s internet browser has an excellent console logging mechanism which I’ve used to create a easy and really useful PHP class for displaying variable, arrays values on browser console through the use of javascript. This straightforward PHP class has 4 hint ranges data, warn, log, error which developer can use to show variable, arrays values on browser console.

Now import the WebConsole class and use the tracing capabilities.

Now verify your Internet Browser console. You will see that the out put just like following screenshot.

web console output - Debugging PHP in browser’s Javascript console

Supply techzoo.org