3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $then = new DateTime("F j, Y, g:i a", 1453404); $now = new DateTime("F j, Y, g:i a"); $interval = date_diff($now, $then); echo $then; echo $now; echo $interval;
based on QQIeT
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, integer given in /in/ouqbc:2 Stack trace: #0 /in/ouqbc(2): DateTime->__construct('F j, Y, g:i a', 1453404) #1 {main} thrown in /in/ouqbc on line 2
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, integer given' in /in/ouqbc:2 Stack trace: #0 /in/ouqbc(2): DateTime->__construct('F j, Y, g:i a', 1453404) #1 {main} thrown in /in/ouqbc on line 2
Process exited with code 255.