3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('front of 5am'); echo $date->format('h:m:s d-m-Y');
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
04:05:00 08-05-2013
Output for 7.0.6
04:05:00 03-05-2016
Output for 7.0.5
04:04:00 02-04-2016
Output for 7.0.4
04:03:00 09-03-2016
Output for 7.0.3
04:03:00 17-03-2016
Output for 7.0.2
04:03:00 21-03-2016
Output for 7.0.1
04:03:00 23-03-2016
Output for 7.0.0
04:03:00 26-03-2016
Output for 5.6.21
04:05:00 01-05-2016
Output for 5.6.20
04:04:00 09-04-2016
Output for 5.6.19
04:03:00 06-03-2016
Output for 5.6.18
04:03:00 14-03-2016
Output for 5.6.17
04:03:00 19-03-2016
Output for 5.6.16
04:03:00 27-03-2016
Output for 5.6.15
04:03:00 28-03-2016
Output for 5.6.14
04:04:00 01-04-2016
Output for 5.6.13
04:04:00 14-04-2016
Output for 5.6.12
04:04:00 19-04-2016
Output for 5.6.11
04:04:00 22-04-2016
Output for 5.6.10
04:04:00 24-04-2016
Output for 5.6.9
04:04:00 27-04-2016
Output for 5.6.8
04:04:00 29-04-2016
Output for 5.6.7
04:05:00 24-05-2016
Output for 5.5.35
04:05:00 21-05-2016
Output for 5.5.34
04:04:00 10-04-2016
Output for 5.5.33
04:03:00 08-03-2016
Output for 5.5.32
04:03:00 15-03-2016
Output for 5.5.31
04:03:00 20-03-2016
Output for 5.5.30
04:03:00 31-03-2016
Output for 5.5.29
04:04:00 16-04-2016
Output for 5.5.28
04:04:00 20-04-2016
Output for 5.5.27
04:04:00 21-04-2016
Output for 5.5.26
04:04:00 25-04-2016
Output for 5.5.25
04:04:00 28-04-2016
Output for 5.5.24
04:04:00 30-04-2016
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
04:02:00 19-02-2016
Output for 5.2.0 - 5.2.17
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (front of 5am) at position 0 (f): The timezone could not be found in the database' in /in/t8GEA:2 Stack trace: #0 /in/t8GEA(2): DateTime->__construct('front of 5am') #1 {main} thrown in /in/t8GEA on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/t8GEA on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/t8GEA on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/t8GEA on line 2

preferences:
254.04 ms | 401 KiB | 355 Q