I'm trying to write a function that formats every (string) member/variable in an object, for example with a callback function. The variable names are unknown to me, so it must work with objects of all classes.
How can I achieve something similar to array_map
or array_walk
with objects?