This function was originally developed to help me easily debug PHP. I modified it to play nicely with Drupal by also outputting object data. With Drupal, the function can be placed in any active custom module and then accessed from any module that you are working on.
Simple is always better so, type cast if it's an object or just jump right to the making it pretty. I like to know if the object was converted because most often when I use this, I'm building my output and knowing how to access the information is key.
