3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = DateTime::createFromFormat('Y-m', '2015-08'); echo $date->format('Y-m-d H:i:s O');
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.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.4, 8.3.6
2015-08-17 04:28:28 +0200
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 2015-08-17 04:28:28 +0200
Output for 7.3.32 - 7.3.33, 8.0.13
2015-08-17 03:28:28 +0000
Output for 7.0.6
2015-08-03 18:54:16 +0200
Output for 7.0.5
2015-08-03 07:18:25 +0200
Output for 7.0.4
2015-08-10 19:07:49 +0200
Output for 7.0.3
2015-08-18 20:20:16 +0200
Output for 7.0.2
2015-08-23 02:27:42 +0200
Output for 7.0.1
2015-08-24 06:01:27 +0200
Output for 7.0.0
2015-08-27 07:57:08 +0200
Output for 5.6.21
2015-08-02 14:03:10 +0200
Output for 5.6.20
2015-08-10 06:17:54 +0200
Output for 5.6.19
2015-08-08 03:18:51 +0200
Output for 5.6.18
2015-08-15 12:05:28 +0200
Output for 5.6.17
2015-08-19 23:41:52 +0200
Output for 5.6.16
2015-08-28 08:44:30 +0200
Output for 5.6.15
2015-08-29 09:35:04 +0200
Output for 5.6.14
2015-08-02 11:24:54 +0200
Output for 5.6.13
2015-08-15 15:52:59 +0200
Output for 5.6.12
2015-08-20 06:21:21 +0200
Output for 5.6.11
2015-08-24 12:44:32 +0200
Output for 5.6.10
2015-08-25 14:46:28 +0200
Output for 5.6.9
2015-08-27 19:56:23 +0200
Output for 5.6.8
2015-08-30 04:49:23 +0200
Output for 5.5.35
2015-08-22 22:05:12 +0200
Output for 5.5.34
2015-08-11 08:29:22 +0200
Output for 5.5.33
2015-08-09 06:05:31 +0200
Output for 5.5.32
2015-08-17 15:57:26 +0200
Output for 5.5.31
2015-08-21 02:45:14 +0200
Output for 5.5.30
2015-08-01 11:28:53 +0200
Output for 5.5.29
2015-08-17 06:14:24 +0200
Output for 5.5.28
2015-08-21 09:35:33 +0200
Output for 5.5.27
2015-08-22 11:20:50 +0200
Output for 5.5.26
2015-08-26 17:29:32 +0200
Output for 5.5.25
2015-08-29 00:25:55 +0200
Output for 5.5.24
2015-08-24 06:54:19 +0200
Output for 5.4.45
2015-08-17 04:28:30 +0200
Output for 5.4.44
2015-08-17 04:28:31 +0200
Output for 5.4.43
2015-08-17 04:28:32 +0200
Output for 5.4.41 - 5.4.42
2015-08-17 04:28:33 +0200
Output for 5.4.40
2015-08-17 04:28:34 +0200
Output for 5.4.38 - 5.4.39
2015-08-17 04:28:35 +0200
Output for 5.4.35 - 5.4.37
2015-08-17 04:28:36 +0200
Output for 5.4.32 - 5.4.34
2015-08-17 04:28:37 +0200
Output for 5.3.29, 5.4.28 - 5.4.31
2015-08-17 04:28:38 +0200
Output for 5.4.25 - 5.4.27
2015-08-17 04:28:39 +0200
Output for 5.3.28, 5.4.21 - 5.4.24
2015-08-17 04:28:40 +0200
Output for 5.4.18 - 5.4.20
2015-08-17 04:28:41 +0200
Output for 5.3.25 - 5.3.27, 5.4.14 - 5.4.17
2015-08-17 04:28:42 +0200
Output for 5.3.20 - 5.3.24, 5.4.11 - 5.4.13
2015-08-17 04:28:43 +0200
Output for 5.3.17 - 5.3.19, 5.4.6 - 5.4.10
2015-08-17 04:28:44 +0200
Output for 5.3.13 - 5.3.16, 5.4.3 - 5.4.5
2015-08-17 04:28:45 +0200
Output for 5.3.9 - 5.3.12, 5.4.0 - 5.4.2
2015-08-17 04:28:46 +0200
Output for 5.3.3 - 5.3.8
2015-08-17 04:28:47 +0200
Output for 5.3.0 - 5.3.2
2015-08-17 04:28:48 +0200
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/0KNmQ on line 3
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::createfromformat() in /in/0KNmQ on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/0KNmQ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/0KNmQ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/0KNmQ on line 3

preferences:
254.47 ms | 401 KiB | 326 Q