Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for easy way to analyze var_dump (PHP) on large objects [closed]

I know (PHP's) var_dump is supposed to be "human readable" and all, but analyzing large objects is just a pain in the neck. I am struggling to make sense of a few of the large objects that are being passed around in a script that we are running. (I know that using xdebug with and IDE is a good idea, but I have not been able to get xdebug to run on this project for some reason - several days lost, ugh).

Any ideas on how I can easily digest the contents of a really big var_dump? Any ideas are welcome... Although I am hoping that there is something similar to Thomas Frank's JSON tool (where you just put some code in and it gives a nice graphical representation).

like image 816
shaune Avatar asked Mar 19 '10 16:03

shaune


3 Answers

I'd just use dBug.

like image 61
Billy ONeal Avatar answered Oct 12 '22 20:10

Billy ONeal


You could take a look at FirePHP. It enables you to write information to the firebug-console. If you write an array or object to the log and hover with your mouse over it, you get a nice presentation of the contents of that array. Here is a screenshot of a simple example.

like image 26
murze Avatar answered Oct 12 '22 20:10

murze


I made a var_dump alternative you should like:

http://raveren.github.io/kint/

Screenshot demonstrating content-aware features:

Kint screenshot
(source: github.io)

like image 31
raveren Avatar answered Oct 12 '22 20:10

raveren