I have been working in Javascript and JSON Objects for some time and find the JS objects are easy to see what is inside; you can log it to the console; structure it and basically see many levels deep. which is great for working in objects I didnt make so I can see what is in there and what I have access to.
to pretty print JSON I usually use something like this:
var str = JSON.stringify(obj, null, 2); // spacing level = 2
console.log('my pretty JSON Object: ', str );
How would I take an object like $myObject in PHP and output (print_r?) it? I don't really care if it is to the console; I really just want to know how PHP developers look inside of and navigate PHP objects.
I know I can json convert it and print it to the console; thats all fine and dandy but is that what people do on a regular basis? I figured there would be a way to do this without requiring another language