3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); echo $date->format('d/m/Y H:i:s');
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
12/09/2014 19:00:39
Output for 7.3.32 - 7.3.33, 8.0.13
12/09/2014 17:00:39
Output for 7.0.6
03/05/2016 05:53:49
Output for 7.0.5
02/04/2016 18:58:17
Output for 7.0.4
10/03/2016 04:56:16
Output for 7.0.3
18/03/2016 05:18:50
Output for 7.0.2
21/03/2016 15:45:31
Output for 7.0.1
23/03/2016 16:21:42
Output for 7.0.0
26/03/2016 18:07:16
Output for 5.6.21
02/05/2016 01:08:51
Output for 5.6.20
09/04/2016 14:14:50
Output for 5.6.19
07/03/2016 05:00:48
Output for 5.6.18
14/03/2016 17:58:39
Output for 5.6.17
19/03/2016 09:41:43
Output for 5.6.16
27/03/2016 19:53:05
Output for 5.6.15
28/03/2016 20:45:54
Output for 5.6.14
01/04/2016 23:16:33
Output for 5.6.13
15/04/2016 03:18:22
Output for 5.6.12
19/04/2016 16:47:26
Output for 5.6.11
22/04/2016 23:42:37
Output for 5.6.10
25/04/2016 01:35:27
Output for 5.6.9
27/04/2016 06:35:56
Output for 5.6.8
29/04/2016 14:27:26
Output for 5.6.7
25/05/2016 04:35:12
Output for 5.5.35
22/05/2016 04:45:42
Output for 5.5.34
10/04/2016 20:12:00
Output for 5.5.33
08/03/2016 15:51:47
Output for 5.5.32
16/03/2016 21:48:32
Output for 5.5.31
20/03/2016 12:32:22
Output for 5.5.30
31/03/2016 22:47:12
Output for 5.5.29
16/04/2016 17:23:50
Output for 5.5.28
20/04/2016 19:49:59
Output for 5.5.27
21/04/2016 22:08:27
Output for 5.5.26
26/04/2016 03:59:11
Output for 5.5.25
28/04/2016 09:57:03
Output for 5.5.24
23/05/2016 16:53:51
Output for 5.4.45
21/09/2015 13:38:40
Output for 5.4.44
21/09/2015 13:38:34
Output for 5.4.43
21/09/2015 13:38:28
Output for 5.4.42
21/09/2015 13:38:26
Output for 5.4.41
21/09/2015 13:38:23
Output for 5.4.40
21/09/2015 13:38:20
Output for 5.4.39
21/09/2015 13:38:18
Output for 5.4.38
14/03/2015 13:45:22
Output for 5.4.37
14/03/2015 13:45:16
Output for 5.4.35 - 5.4.36
14/03/2015 13:45:15
Output for 5.4.34
14/03/2015 13:45:14
Output for 5.4.28 - 5.4.32
12/09/2014 19:00:43
Output for 5.4.7 - 5.4.27
12/09/2014 19:00:44
Output for 5.3.17 - 5.3.29, 5.4.0 - 5.4.6
12/09/2014 19:00:45
Output for 5.2.13 - 5.2.17, 5.3.0 - 5.3.16
12/09/2014 19:00:46
Output for 5.2.0 - 5.2.12
12/09/2014 19:00:47
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/vZs8r 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/vZs8r 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/vZs8r on line 2

preferences:
205.92 ms | 401 KiB | 309 Q