src/Map.php
public function toArray()
    {
        $array = [];
        foreach ($this->array as $hash => $value) {
            $key = $this->hash_to_key($hash);
            if ($this->is_collection_like($value)) {
                $array[$key] = $this->collection_to_array($value);
            } else {
                $array[$key] = $value;
            }
        }
        return $array;
    }
public function toArray()
    {
        $array = [];
        foreach ($this->array as $hash => $value) {
            $key = $this->hash_to_key($hash);
            if ($this->is_collection_like($value)) {
                $array[$key] = $this->collection_to_array($value);
            } else {
                $array[$key] = $value;
            }
        }
        return $array;
    }
public function toArray ( ) { $ array = [ ] ; foreach ( $ this -> array as $ hash => $ value ) { $ key = $ this -> hash_to_key ( $ hash ) ; if ( $ this -> is_collection_like ( $ value ) ) { $ array [ $ key ] = $ this -> collection_to_array ( $ value ) ; } else { $ array [ $ key ] = $ value ; } } return $ array ; }
Copy this map into an array, recursing as necessary to convert
contained collections into arrays.

@api
Copy this map into an array recursing as necessary to convert contained collections into arrays .