3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo strtotime("2014.05.14"); echo date("Y-m-d",strtotime("2014.05.14")); $timezone = "Europe/Berlin"; $date = new DateTime($dateStr, new DateTimeZone($timezone)); echo $date->format("Y-m-d"); ?>
Output for 5.2.0 - 7.1.0
1970-01-01 Notice: Undefined variable: dateStr in /in/YlJSF on line 6 2014-05-23
Output for 5.1.3 - 5.1.6
1970-01-01 Fatal error: Class 'DateTime' not found in /in/YlJSF on line 6
Process exited with code 255.
Output for 5.1.0 - 5.1.2
14008688402014-05-23 Fatal error: Class 'DateTime' not found in /in/YlJSF on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5
-11970-01-01 Fatal error: Class 'DateTime' not found in /in/YlJSF on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
-11970-01-01 Fatal error: Cannot instantiate non-existent class: datetime in /in/YlJSF on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
-11970-01-01 Fatal error: Cannot instantiate non-existent class: datetime in /in/YlJSF on line 6