I have this code in php that I could not run in PHP 5.2.9 please give me an Idea to convert this code to work on PHP 5.2.9 Thanks,
$startTime = new DateTime(date('h:i:s a'));
$endTime = new DateTime("3:00:00 pm");
$timeTaken = $endTime->diff($startTime);
$timeTaken = $timeTaken->format('%h hour, %i mins, %s sec');