src/Carbon/CarbonPeriod.php
public function toArray()
    {
        $state = [
            $this->key,
            $this->current ? $this->current->copy() : null,
            $this->validationResult,
        ];

        $result = iterator_to_array($this);

        [
            $this->key,
            $this->current,
            $this->validationResult
        ] = $state;

        return $result;
    }
public function toArray()
    {
        $state = [
            $this->key,
            $this->current ? $this->current->copy() : null,
            $this->validationResult,
        ];

        $result = iterator_to_array($this);

        [
            $this->key,
            $this->current,
            $this->validationResult
        ] = $state;

        return $result;
    }
public function toArray ( ) { $ state = [ $ this -> key , $ this -> current ? $ this -> current -> copy ( ) : null , $ this -> validationResult , ] ; $ result = iterator_to_array ( $ this ) ; [ $ this -> key , $ this -> current , $ this -> validationResult ] = $ state ; return $ result ; }
Convert the date period into an array without changing current iteration state.

@return array
Convert the date period into an array without changing current iteration state .