3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('now +1 day'); //echo $date->format('Y-m-d H:i:s'); echo $date->format('H:i on the jS m Y ');
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.28, 5.4.0 - 5.4.25, 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.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
09:48 20143 3109Europe/Amsterdam 7th 03 2014
Output for 7.3.32 - 7.3.33, 8.0.13
08:48 20143 3108UTC 7th 03 2014
Output for 7.0.6
08:21 20165 3108Europe/Amsterdam 4th 05 2016
Output for 7.0.5
21:18 20164 3009Europe/Amsterdam 3rd 04 2016
Output for 7.0.4
07:36 20163 3107Europe/Amsterdam 11th 03 2016
Output for 7.0.3
08:10 20163 3108Europe/Amsterdam 19th 03 2016
Output for 7.0.2
13:55 20163 3101Europe/Amsterdam 23rd 03 2016
Output for 7.0.1
18:57 20163 3106Europe/Amsterdam 24th 03 2016
Output for 7.0.0
20:34 20163 3108Europe/Amsterdam 27th 03 2016
Output for 5.6.21
03:41 20165 3103Europe/Amsterdam 3rd 05 2016
Output for 5.6.20
20:10 20164 3008Europe/Amsterdam 10th 04 2016
Output for 5.6.19
15:43 20163 3103Europe/Amsterdam 8th 03 2016
Output for 5.6.18
23:30 20163 3111Europe/Amsterdam 15th 03 2016
Output for 5.6.17
12:28 20163 3112Europe/Amsterdam 20th 03 2016
Output for 5.6.16
22:20 20163 3110Europe/Amsterdam 28th 03 2016
Output for 5.6.15
23:13 20163 3111Europe/Amsterdam 29th 03 2016
Output for 5.6.14
01:47 20164 3001Europe/Amsterdam 3rd 04 2016
Output for 5.6.13
05:42 20164 3005Europe/Amsterdam 16th 04 2016
Output for 5.6.12
19:20 20164 3007Europe/Amsterdam 20th 04 2016
Output for 5.6.11
02:21 20164 3002Europe/Amsterdam 24th 04 2016
Output for 5.6.10
04:10 20164 3004Europe/Amsterdam 26th 04 2016
Output for 5.6.9
09:08 20164 3009Europe/Amsterdam 28th 04 2016
Output for 5.6.8
17:09 20164 3005Europe/Amsterdam 30th 04 2016
Output for 5.6.7
11:54 20165 3111Europe/Amsterdam 26th 05 2016
Output for 5.5.35
07:23 20165 3107Europe/Amsterdam 23rd 05 2016
Output for 5.5.34
22:34 20164 3010Europe/Amsterdam 11th 04 2016
Output for 5.5.33
18:33 20163 3106Europe/Amsterdam 9th 03 2016
Output for 5.5.32
01:21 20163 3101Europe/Amsterdam 18th 03 2016
Output for 5.5.31
15:15 20163 3103Europe/Amsterdam 21st 03 2016
Output for 5.5.30
01:21 20164 3001Europe/Amsterdam 2nd 04 2016
Output for 5.5.29
19:47 20164 3007Europe/Amsterdam 17th 04 2016
Output for 5.5.28
22:26 20164 3010Europe/Amsterdam 21st 04 2016
Output for 5.5.27
00:57 20164 3012Europe/Amsterdam 23rd 04 2016
Output for 5.5.26
06:36 20164 3006Europe/Amsterdam 27th 04 2016
Output for 5.5.25
12:40 20164 3012Europe/Amsterdam 29th 04 2016
Output for 5.5.24
19:36 20165 3107Europe/Amsterdam 24th 05 2016
Output for 5.4.45
03:15 20159 3003Europe/Amsterdam 15th 09 2015
Output for 5.4.44
03:14 20159 3003Europe/Amsterdam 15th 09 2015
Output for 5.4.41 - 5.4.43
23:41 20157 3111Europe/Amsterdam 27th 07 2015
Output for 5.4.39 - 5.4.40
14:53 20155 3102Europe/Amsterdam 11th 05 2015
Output for 5.4.38
12:36 20153 3112Europe/Amsterdam 3rd 03 2015
Output for 5.4.34 - 5.4.37
07:52 20152 2807Europe/Amsterdam 9th 02 2015
Output for 5.3.29, 5.4.26 - 5.4.32
04:31 20149 3004Europe/Amsterdam 8th 09 2014
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/dR3I2 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/dR3I2 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/dR3I2 on line 2

preferences:
271.57 ms | 401 KiB | 344 Q