3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new \DateTime('1442604145'); echo $a->format('Y-m-d H:i:s');
Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.25, 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
4145-09-04 14:43:00
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 4145-09-04 14:43:00
Output for 7.0.6
4145-05-03 14:43:00
Output for 5.6.14, 7.0.5
4145-04-02 14:43:00
Output for 7.0.4
4145-03-10 14:43:00
Output for 7.0.3
4145-03-18 14:43:00
Output for 7.0.2
4145-03-22 14:43:00
Output for 7.0.1
4145-03-23 14:43:00
Output for 7.0.0
4145-03-26 14:43:00
Output for 5.6.21
4145-05-02 14:43:00
Output for 5.6.20
4145-04-09 14:43:00
Output for 5.6.19
4145-03-07 14:43:00
Output for 5.6.18
4145-03-14 14:43:00
Output for 5.6.17
4145-03-19 14:43:00
Output for 5.6.16
4145-03-27 14:43:00
Output for 5.6.15
4145-03-28 14:43:00
Output for 5.6.13
4145-04-15 14:43:00
Output for 5.6.12
4145-04-19 14:43:00
Output for 5.6.11
4145-04-23 14:43:00
Output for 5.6.10
4145-04-25 14:43:00
Output for 5.6.9
4145-04-27 14:43:00
Output for 5.6.8
4145-04-29 14:43:00
Output for 5.6.7
4145-05-25 14:43:00
Output for 5.5.35
4145-05-22 14:43:00
Output for 5.5.34
4145-04-10 14:43:00
Output for 5.5.33
4145-03-08 14:43:00
Output for 5.5.32
4145-03-16 14:43:00
Output for 5.5.31
4145-03-20 14:43:00
Output for 5.5.30
4145-03-31 14:43:00
Output for 5.5.29
4145-04-16 14:43:00
Output for 5.5.28
4145-04-20 14:43:00
Output for 5.5.27
4145-04-21 14:43:00
Output for 5.5.26
4145-04-26 14:43:00
Output for 5.5.25
4145-04-28 14:43:00
Output for 5.5.24
4145-05-23 14:43:00
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
4145-10-13 14:43:00
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/aXfkt on line 3 4145-10-13 14:43:00
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/aXfkt on line 3 Fatal error: Class 'DateTime' not found in /in/aXfkt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/aXfkt on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/aXfkt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/aXfkt on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/aXfkt on line 3

preferences:
222.06 ms | 401 KiB | 327 Q