src/Period.php
public function toDateInterval() : \DateInterval
    {
        return \DateInterval::createFromDateString(\sprintf(
            '%d years %d months %d days',
            $this->years,
            $this->months,
            $this->days
        ));
    }
public function toDateInterval() : \DateInterval
    {
        return \DateInterval::createFromDateString(\sprintf(
            '%d years %d months %d days',
            $this->years,
            $this->months,
            $this->days
        ));
    }
public function toDateInterval ( ) : \ DateInterval { return \ DateInterval :: createFromDateString ( \ sprintf ( '%d years %d months %d days' , $ this -> years , $ this -> months , $ this -> days ) ) ; }
Returns a native DateInterval object equivalent to this Period.

We cannot use the constructor with the output of __toString(),
as it does not support negative values.

@return \DateInterval
Returns a native DateInterval object equivalent to this Period .