3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function add_date($givendate,$hours) { $cd = strtotime($givendate); $newdate = date('Y-m-d h:i:s', mktime(date('h', $cd) + $hours)); return $newdate; } echo(date('Y/m/d H:i:s')."\n"); echo(add_date(date('Y/m/d H:i:s'), 15)."\n");
Output for 4.3.0 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
2013/07/16 08:10:39 2013-07-16 11:10:39
Output for hhvm-3.12.0
2013/07/16 08:10:40 2013-07-16 11:10:40