3v4l.org

run code in 200+ 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 - 7.2.0
2013/07/16 08:10:39 2013-07-16 11:10:39