3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time ='2013-03-31 01:15:00'; $stamp = strtotime($time); for($i=0; $i<4; $i++){ echo date('Y-m-d H:i:s', strtotime("+{$i} hours", $stamp))."<br />\n"; }
Output for 5.1.0 - 7.1.0
2013-03-31 01:15:00<br /> 2013-03-31 03:15:00<br /> 2013-03-31 03:15:00<br /> 2013-03-31 04:15:00<br />
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.0.5
2013-03-31 01:15:00<br /> 2013-03-31 03:15:00<br /> 2013-03-31 04:15:00<br /> 2013-03-31 05:15:00<br />
Output for 5.0.0 - 5.0.2
2013-03-31 00:00:00<br /> 2013-03-31 01:00:00<br /> 2013-03-31 03:00:00<br /> 2013-03-31 04:00:00<br />