3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $phpdate = strtotime('-1 day'); echo PHP_EOL; $mysqldate = date('Y-m-d H:i:s', $phpdate); function get_day_name($timestamp) { $date = date('d/m/Y', $timestamp); if($date == date('d/m/Y')) { $day_name = 'Today'; } else if($date == date('d/m/Y',now() - (24 * 60 * 60))) { $day_name = 'Yesterday'; } return $date; } print date('G:i:s', $phpdate).' '.get_day_name($phpdate); ?>
Output for git.master, git.master_jit, rfc.property-hooks
1387318486 Fatal error: Uncaught Error: Call to undefined function now() in /in/9bCgG:13 Stack trace: #0 /in/9bCgG(18): get_day_name(1387318486) #1 {main} thrown in /in/9bCgG on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.09 ms | 401 KiB | 8 Q