3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(date('Y-m-d H:i:s')); var_dump(date('Y-m-d H:i:s', strtotime('-1 day'))); var_dump(date('Y-m-d H:i:s', strtotime('-3 hour'))); var_dump(date('Y-m-d H:i:s', strtotime('-3 min')));
based on Q8Q8i
Output for 5.5.0 - 5.6.5, 5.6.7 - 7.2.0
string(19) "2015-11-09 03:45:19" string(19) "2015-11-08 03:45:19" string(19) "2015-11-09 00:45:19" string(19) "2015-11-09 03:42:19"
Output for 5.6.6
string(19) "2015-11-09 03:45:18" string(19) "2015-11-08 03:45:18" string(19) "2015-11-09 00:45:18" string(19) "2015-11-09 03:42:18"