3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = '02:03'; $time = explode(':', $time); $now = new DateTime(); echo $now->format('d-m-Y H:i'); $interval = new DateInterval('PT'.$time[0].'H'.$time[1].'M'); $now->add($interval); echo $now->format('d-m-Y H:i');
Output for 5.6.30, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.9
13-07-2017 20:0213-07-2017 22:05