3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo (new \DateTime())->format('m-Y-d');
Output for 5.4.0 - 5.4.26, 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 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.6
04-2014-03
Output for 7.0.6
05-2016-03
Output for 5.6.14, 7.0.5
04-2016-02
Output for 7.0.4
03-2016-10
Output for 7.0.3
03-2016-18
Output for 7.0.2
03-2016-22
Output for 7.0.1
03-2016-23
Output for 7.0.0
03-2016-26
Output for 5.6.21
05-2016-02
Output for 5.6.20
04-2016-09
Output for 5.6.19
03-2016-07
Output for 5.6.18
03-2016-14
Output for 5.6.17
03-2016-19
Output for 5.6.16
03-2016-27
Output for 5.6.15
03-2016-28
Output for 5.6.13
04-2016-15
Output for 5.6.12
04-2016-19
Output for 5.6.11
04-2016-23
Output for 5.6.10
04-2016-25
Output for 5.6.9
04-2016-27
Output for 5.6.8
04-2016-29
Output for 5.6.7
05-2016-25
Output for 5.5.35
05-2016-22
Output for 5.5.34
04-2016-10
Output for 5.5.33
03-2016-08
Output for 5.5.32
03-2016-17
Output for 5.5.31
03-2016-20
Output for 5.5.30
04-2016-01
Output for 5.5.29
04-2016-16
Output for 5.5.28
04-2016-20
Output for 5.5.27
04-2016-22
Output for 5.5.26
04-2016-26
Output for 5.5.25
04-2016-28
Output for 5.5.24
05-2016-23
Output for 5.4.44 - 5.4.45
09-2015-19
Output for 5.4.41 - 5.4.43
07-2015-13
Output for 5.4.39 - 5.4.40
05-2015-15
Output for 5.4.38
03-2015-02
Output for 5.4.34 - 5.4.37
02-2015-08
Output for 5.4.27 - 5.4.32
09-2014-08
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/6MNq4 on line 2
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/6MNq4 on line 2 Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/6MNq4 on line 2
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/6MNq4 on line 2 Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/6MNq4 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/6MNq4 on line 2 Parse error: parse error, expecting `','' or `';'' in /in/6MNq4 on line 2
Process exited with code 255.

preferences:
205.66 ms | 401 KiB | 315 Q