3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo($givendate = date('Y/m/d H:i:s')."\n"); $cd = strtotime($givendate); $newdate = date('Y/m/d h:i:s', mktime(date('h', $cd) + $hours)); echo($newdate."\n");
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2013/07/16 08:12:28 Notice: Undefined variable: hours in /in/5QCPt on line 6 2013/07/16 08:12:28
Output for 4.3.0 - 5.0.3
2013/07/16 08:12:28 Notice: Undefined variable: hours in /in/5QCPt on line 6 2013/07/16 08:12:28