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 strtotime(date("Y-m-d H:i:s")); echo "\n"; echo strtotime("-60 minutes");
based on CdvEd
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
bool(false) 1413887374 1413892138 1413888538
Output for 5.0.0 - 5.0.2
bool(true) 1413887374 1413892138 1413838800