public static function timeDiffSeconds(DateTime $time1, DateTime $time2)
    {
        $interval = $time1->diff($time2);

        return self::totalSeconds($interval);
    }
public static function timeDiffSeconds(DateTime $time1, DateTime $time2)
    {
        $interval = $time1->diff($time2);

        return self::totalSeconds($interval);
    }
public static function timeDiffSeconds ( DateTime $ time1 , DateTime $ time2 ) { $ interval = $ time1 -> diff ( $ time2 ) ; return self :: totalSeconds ( $ interval ) ; }
Get the time difference between two DateTime object in seconds.

@param \DateTime $time1
@param \DateTime $time2
@return integer a number of seconds.
Get the time difference between two DateTime object in seconds .