3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo date('d-m-y H:i:s',0); echo "\n"; echo date('d-m-y H:i:s',-1); echo "\n"; if (PHP_VERSION_ID >= PHP_VERSION) { date_default_timezone_set('UTC'); echo date('d-m-y H:i:s',0); echo "\n"; echo date('d-m-y H:i:s',-1); echo "\n"; }
Output for 5.2.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
01-01-70 01:00:00 01-01-70 00:59:59 01-01-70 00:00:00 31-12-69 23:59:59
Output for 5.1.0 - 5.2.6
01-01-70 01:00:00 01-01-70 00:59:59 Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/Y6Bl2 on line 8 01-01-70 00:00:00 31-12-69 23:59:59
Output for 5.0.0 - 5.0.5
01-01-70 01:00:00 01-01-70 00:59:59 Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/Y6Bl2 on line 8 Fatal error: Call to undefined function date_default_timezone_set() in /in/Y6Bl2 on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
01-01-70 01:00:00 01-01-70 00:59:59 Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/Y6Bl2 on line 8 Fatal error: Call to undefined function: date_default_timezone_set() in /in/Y6Bl2 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
01-01-70 01:00:00 01-01-70 00:59:59 Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/Y6Bl2 on line 8 Fatal error: Call to undefined function: date_default_timezone_set() in /in/Y6Bl2 on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
01-01-70 01:00:00 01-01-70 00:59:59 Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/Y6Bl2 on line 8 Fatal error: Call to undefined function: date_default_timezone_set() in /in/Y6Bl2 on line 10