public static function arrayWalkRecursive(array $data, callable $function)
    {
        if (!is_array($data)) {
            return call_user_func($function, $data);
        }

        foreach ($data as $k => &$item) {
            $item = self::arrayWalkRecursive($data[$k], $function);
        }

        return $data;
    }
public static function arrayWalkRecursive(array $data, callable $function)
    {
        if (!is_array($data)) {
            return call_user_func($function, $data);
        }

        foreach ($data as $k => &$item) {
            $item = self::arrayWalkRecursive($data[$k], $function);
        }

        return $data;
    }
public static function arrayWalkRecursive ( array $ data , callable $ function ) { if ( ! is_array ( $ data ) ) { return call_user_func ( $ function , $ data ) ; } foreach ( $ data as $ k => & $ item ) { $ item = self :: arrayWalkRecursive ( $ data [ $ k ] , $ function ) ; } return $ data ; }
Array walk recursive

@access public

@param array $data array to walk
@param callable $function callable function

@return array|mixed
@static
Array walk recursive