3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Draw_time = "29/01/2016 7pm"; $date = DateTime::createFromFormat("d/m/Y ha",$Draw_time); $new_date = $date->format('Y-m-d H:i:s'); $seconds = strtotime($new_date) - time(); $days = floor($seconds / 86400); $seconds %= 86400; $hours = floor($seconds / 3600); $seconds %= 3600; $minutes = floor($seconds / 60); $seconds %= 60; echo "$days days and $hours hours and $minutes minutes and $seconds seconds";

preferences:
32.24 ms | 402 KiB | 5 Q