PHP stdClass Object to Array

This post defines two ultra simple recursive function to convert multidimensional Objects to Arrays and multidimensional Arrays to Objects.

http://www.if-not-true-then-false.com/2009/php-tip-convert-stdclass-object-to-multidimensional-array-and-convert-multidimensional-array-to-stdclass-object/

NOTE: If this function is called as a class method, then the return line needs to be replaced with the following…

return array_map( array($this, __FUNCTION__), $d );