src/DateTime.php
public function add($interval)
    {
        parent::add($interval);

        if ($interval instanceof DateInterval) {
            if ($interval->invert) { // is negative, then sub
                $this->subMicroseconds($interval->u);
            } else {
                $this->addMicroseconds($interval->u);
            }
        }

        return $this;
    }
public function add($interval)
    {
        parent::add($interval);

        if ($interval instanceof DateInterval) {
            if ($interval->invert) { // is negative, then sub
                $this->subMicroseconds($interval->u);
            } else {
                $this->addMicroseconds($interval->u);
            }
        }

        return $this;
    }
public function add ( $ interval ) { parent :: add ( $ interval ) ; if ( $ interval instanceof DateInterval ) { if ( $ interval -> invert ) { // is negative, then sub $ this -> subMicroseconds ( $ interval -> u ) ; } else { $ this -> addMicroseconds ( $ interval -> u ) ; } } return $ this ; }
Adds an amount of days, months, years, hours, minutes, seconds and microseconds to a DateTime object

@param DateInterval $interval
@return DateTime $this
Adds an amount of days months years hours minutes seconds and microseconds to a DateTime object