As developers, we all do some debugging within the code that we are writing at that moment. Usually the first choice is either calling var_dump or print_r depending on what we are used to but it usually ends the same way:
- print '<pre>';
- // or print_r($something);
Usually the <pre> tag is not even included due to us being lazy and we end up viewing the source because the output that we got in Times New Roman is not really that readable.
Of course, there is Xdebug which we can used but not all of us have control over our webservers or desire to install/enable any extensions.
Here is a class, which you will be able to use in all those occasions.
It could as well be considered an improvement over the class mentioned in one of my previous articles however this class does not change the format of the output, only its colors.