In C++ there is a way to overload the cout so you wouldn't have to call some method to print all the variables in some object. Is there a way to do this in php?
e.g. print myObject;
This would then output in a format I defined in a print method of myObject.