3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mysql_timestamp = "2014-10-21 12:29:34"; $this_is_new = false; if(strtotime($mysql_timestamp) > strtotime("-60 minutes")) { $this_is_new = true; } var_dump($this_is_new); echo strtotime($mysql_timestamp); echo "\n"; echo date("Y-m-d H:i:s"); echo "\n"; echo strtotime("-60 minutes");
based on 8lgrS
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false) 1413887374 2014-10-21 13:49:26 1413888566
Output for 5.0.0 - 5.0.2
bool(true) 1413887374 2014-10-21 13:49:26 1413838800