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"; } ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23, 5.5.0 - 5.5.7
Parse error: syntax error, unexpected '{' in /in/jjheW on line 22
Process exited with code 255.

preferences:
187.83 ms | 1395 KiB | 68 Q