public function toArray() {
        $result = iterator_to_array($this);
        foreach($result as $key => &$value) {
            if($value instanceof ArrayObject) {
                $value = $value->toArray();
            }
        }

        return $result;
    }
public function toArray() {
        $result = iterator_to_array($this);
        foreach($result as $key => &$value) {
            if($value instanceof ArrayObject) {
                $value = $value->toArray();
            }
        }

        return $result;
    }
public function toArray ( ) { $ result = iterator_to_array ( $ this ) ; foreach ( $ result as $ key => & $ value ) { if ( $ value instanceof ArrayObject ) { $ value = $ value -> toArray ( ) ; } } return $ result ; }
Returns the keys and values of this object as a standard array

@return array<mixed> The keys and values as an array
Returns the keys and values of this object as a standard array