public static function each(array &$storage, \Closure $callback, array $prefix = array())
    {
        foreach($storage as $key => &$value)
        {
            if(is_array($value))
                static::each($value, $callback, array_merge($prefix, array($key)));
            else
                $callback(implode('.', array_merge($prefix, array($key))), $value, $storage[$key]);
        }
    }
public static function each(array &$storage, \Closure $callback, array $prefix = array())
    {
        foreach($storage as $key => &$value)
        {
            if(is_array($value))
                static::each($value, $callback, array_merge($prefix, array($key)));
            else
                $callback(implode('.', array_merge($prefix, array($key))), $value, $storage[$key]);
        }
    }
public static function each ( array & $ storage , \ Closure $ callback , array $ prefix = array ( ) ) { foreach ( $ storage as $ key => & $ value ) { if ( is_array ( $ value ) ) static :: each ( $ value , $ callback , array_merge ( $ prefix , array ( $ key ) ) ) ; else $ callback ( implode ( '.' , array_merge ( $ prefix , array ( $ key ) ) ) , $ value , $ storage [ $ key ] ) ; } }
Recursively loop through multidimensional array
With every loop receive a dotted key
@param array &$storage
@param \Closure $callback
@param array $prefix
Recursively loop through multidimensional array With every loop receive a dotted key