I’m trying to figure out what some PHP code is doing. In particular, I need to see inside the structure of some of these PHP object variable. I’m doing
print_r $someStuff;
but it blocks program flow when it displays things to the page. And I see it display “Array()” on a white page. What does that mean? An empty array?
How I can do a print_r to a log file?
Or is there a better way to examine what goes on in PHP code?
Except, I’m debugging code on the server (test application on a test server on a shared webhost). I don’t have a local PHP development environment. I have to use things like debug_backtrace(), var_dump, etc. But they all seem to print to page.