public static function array_map_recursive($function, array $array)
    {
        $tmp = array();

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $tmp[$key] = self::array_map_recursive($function, $value);
            } else {
                $tmp[$key] = call_user_func($function, $value);
            }
        }

        return $tmp;
    }
public static function array_map_recursive($function, array $array)
    {
        $tmp = array();

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $tmp[$key] = self::array_map_recursive($function, $value);
            } else {
                $tmp[$key] = call_user_func($function, $value);
            }
        }

        return $tmp;
    }
public static function array_map_recursive ( $ function , array $ array ) { $ tmp = array ( ) ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ tmp [ $ key ] = self :: array_map_recursive ( $ function , $ value ) ; } else { $ tmp [ $ key ] = call_user_func ( $ function , $ value ) ; } } return $ tmp ; }
Function recursively apply a function to an array's values.
This will not touch the keys, just the values.

@since Symphony 2.2
@param string $function
@param array $array
@return array
a new array with all the values passed through the given `$function`
Function recursively apply a function to an array s values . This will not touch the keys just the values .