I'm fairly new to PHP, so forgive me if there's an easy answer to this. I've searched for any similar questions in stackoverflow, but couldn't find any help.
I'm working on an existing php-based application, and I simply need to be able to print the contents of objects and arrays to either a log or console for debugging. The catch is that the function isn't directly called by the client, but rather pulls MySQL data, modifies it, and returns the data. This means options like Chrome Logger (https://craig.is/writing/chrome-logger) and using console.log() in javascript do not show up in the console.
The application I'm working for has a simple logging function, but it only accepts strings. I am unable to modify the log function, and as such am having trouble printing objects and arrays of which I have no idea what the contents are.
Does anyone have any advice as to how to proceed in this matter?
In particular, I'm trying to find the results of the MySQL query, so if there's a workaround to obtain that data, that would would work as well.
Thanks a lot in advance!