3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $phpdate = strtotime('+2 day'); echo PHP_EOL; echo $mysqldate = date('Y-m-d H:i:s', $phpdate); echo PHP_EOL; $last_access = $phpdate; $now = time(); $last_midnight = $now - ($now % (24*60*60)); if ($last_access >= $last_midnight) { print "Today"; } elseif ($last_access >= ($last_midnight-(24*60*60))) { print "Yesterday"; } else{print 'AAAA';} ?>
Output for 4.3.10 - 4.3.11, 4.4.0 - 4.4.9, 5.0.3 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
1387584879 2013-12-21 01:14:39 Today
Output for 5.0.2
1387580400 2013-12-21 00:00:00 Today
Output for 5.0.0 - 5.0.1
1387580400 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gWPi1 on line 5 PHP_EOL2013-12-21 00:00:00 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gWPi1 on line 7 PHP_EOLToday
Output for 4.3.0 - 4.3.9
1387584879 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gWPi1 on line 5 PHP_EOL2013-12-21 01:14:39 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/gWPi1 on line 7 PHP_EOLToday

preferences:
186.98 ms | 401 KiB | 248 Q