3v4l.org

run code in 300+ PHP versions simultaneously
<?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");

preferences:
39.12 ms | 402 KiB | 5 Q