3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=(new \DateTime())->format('m'); $day=(new \DateTime())->format('d'); echo ($month.$day); ?>
Output for 5.4.0 - 5.4.32, 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
1016
Output for 7.0.6
0503
Output for 5.6.14, 7.0.5
0402
Output for 7.0.4
0310
Output for 7.0.3
0318
Output for 7.0.2
0322
Output for 7.0.1
0323
Output for 7.0.0
0326
Output for 5.6.21
0502
Output for 5.6.20
0409
Output for 5.6.19
0307
Output for 5.6.18
0315
Output for 5.6.17
0319
Output for 5.6.16
0328
Output for 5.6.15
0329
Output for 5.6.13
0415
Output for 5.6.12
0419
Output for 5.6.11
0423
Output for 5.6.10
0425
Output for 5.6.9
0427
Output for 5.6.8
0429
Output for 5.5.35
0522
Output for 5.5.34
0411
Output for 5.5.33
0308
Output for 5.5.32
0317
Output for 5.5.31
0320
Output for 5.5.30
0401
Output for 5.5.29
0416
Output for 5.5.28
0421
Output for 5.5.27
0422
Output for 5.5.26
0426
Output for 5.5.25
0428
Output for 5.5.24
0523
Output for 5.4.43 - 5.4.45
0920
Output for 5.4.34 - 5.4.42
0709
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/tqAsZ on line 1
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/tqAsZ on line 1 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/tqAsZ on line 1
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/tqAsZ on line 1 Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/tqAsZ on line 1
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/tqAsZ on line 1 Parse error: parse error in /in/tqAsZ on line 1
Process exited with code 255.

preferences:
260.64 ms | 401 KiB | 351 Q