3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(gmdate('Y-m-d', 1399669200000 /1000 )); var_dump(gmdate('Y-m-d', 1399755600000 /1000 )); $dt = new DateTime('1399755600'); var_dump($dt->format('Y-m-d')); var_dump(strtotime('2014-05-10 23:00:00'));
Output for 7.0.0 - 7.1.0
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1399755600) at position 8 (0): Unexpected character in /in/JpHG2:5 Stack trace: #0 /in/JpHG2(5): DateTime->__construct('1399755600') #1 {main} thrown in /in/JpHG2 on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1399755600) at position 8 (0): Unexpected character' in /in/JpHG2:5 Stack trace: #0 /in/JpHG2(5): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for 5.2.0 - 5.6.28
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1399755600) at position 8 (0): Unexpected character' in /in/JpHG2:5 Stack trace: #0 /in/JpHG2(5): DateTime->__construct('1399755600') #1 {main} thrown in /in/JpHG2 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Class 'DateTime' not found in /in/JpHG2 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Cannot instantiate non-existent class: datetime in /in/JpHG2 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(10) "2014-05-09" string(10) "2014-05-10" Fatal error: Cannot instantiate non-existent class: datetime in /in/JpHG2 on line 5