- var_dump: documentation ( source)
- date: documentation ( source)
<?php
$nowTime = new \DateTime;
$programTime = new \DateTime(date('Y-m-d') . " 18:30");
$lengthSeconds = 1200;
$endDate = $programTime->add(new \DateInterval('PT' . $lengthSeconds . 'S'));
$diff = $endDate->diff($nowTime);
var_dump($diff->getTimestamp());