3fa_pw
Last Updated: August 02, 2018
·
797
· wkjagt

Discoverable pretty print (PHP)

When debugging something in many files, you can have a lot of print_r's and it can be hard to find all of them when you're done debugging. I made myself a shortcut in ST2 that gives me the following line:

echo '<pre>file: '.__FILE__."\nline: ".__LINE__."\n".print_r(, true).'</pre>';

It also places the cursor at the first argument position of the print_r.

This will not only output your variable in a pretty way, but also the location of the line number and file name of where I put the line.

1 Response
Add your response

30267

As we all know that the scope for eCommerce product data entry services https://productdataentryservices.net is increasing day by day so in order to access it you should know all information and that information you can have from here the portal we have shared.

3 months ago ·