3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abc=4; $dayAfterTomorrow = (new \DateTime())->add(new \DateInterval('P'.$abc.'D')); echo $dayAfterTomorrow->format('d m Y');
Output for 5.4.0 - 5.4.32, 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.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
07 10 2014
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 07 10 2014
Output for 7.0.6
07 05 2016
Output for 5.6.14, 7.0.5
06 04 2016
Output for 7.0.4
14 03 2016
Output for 7.0.3
22 03 2016
Output for 7.0.2
26 03 2016
Output for 7.0.1
27 03 2016
Output for 7.0.0
30 03 2016
Output for 5.6.21
06 05 2016
Output for 5.6.20
13 04 2016
Output for 5.6.19
11 03 2016
Output for 5.6.18
19 03 2016
Output for 5.6.17
23 03 2016
Output for 5.6.16
01 04 2016
Output for 5.6.15
02 04 2016
Output for 5.6.13
19 04 2016
Output for 5.6.12
23 04 2016
Output for 5.6.11
27 04 2016
Output for 5.6.10
29 04 2016
Output for 5.6.9
01 05 2016
Output for 5.6.8
03 05 2016
Output for 5.5.35
26 05 2016
Output for 5.5.34
15 04 2016
Output for 5.5.33
12 03 2016
Output for 5.5.32
21 03 2016
Output for 5.5.31
24 03 2016
Output for 5.5.30
05 04 2016
Output for 5.5.29
20 04 2016
Output for 5.5.28
25 04 2016
Output for 5.5.27
26 04 2016
Output for 5.5.26
30 04 2016
Output for 5.5.25
02 05 2016
Output for 5.5.24
27 05 2016
Output for 5.4.45
24 09 2015
Output for 5.4.39 - 5.4.44
21 08 2015
Output for 5.4.34 - 5.4.38
19 03 2015
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/LgAP9 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/LgAP9 on line 3 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/LgAP9 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/LgAP9 on line 3 Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/LgAP9 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/LgAP9 on line 3 Parse error: parse error in /in/LgAP9 on line 3
Process exited with code 255.

preferences:
191.33 ms | 401 KiB | 312 Q