3v4l.org

run code in 300+ PHP versions simultaneously
<?php $monday = new DateTime(); $monday->setISODate(2014, 37, 1); $sunday = new DateTime(); $sunday->setISODate(2014, 37, 7); echo $monday->format('Y-m-d H:i:s')."\n"; echo $sunday->format('Y-m-d H:i:s');
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 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.6
2014-09-08 07:56:23 2014-09-14 07:56:23
Output for 7.3.32 - 7.3.33, 8.0.13
2014-09-08 05:56:23 2014-09-14 05:56:23
Output for 7.1.25
2014-09-08 07:56:24 2014-09-14 07:56:24
Output for 7.0.6
2014-09-08 03:15:34 2014-09-14 03:15:34
Output for 7.0.5
2014-09-08 16:29:55 2014-09-14 16:29:55
Output for 7.0.4
2014-09-08 02:07:19 2014-09-14 02:07:19
Output for 7.0.3
2014-09-08 02:19:14 2014-09-14 02:19:14
Output for 7.0.2
2014-09-08 12:52:33 2014-09-14 12:52:33
Output for 7.0.1
2014-09-08 13:05:58 2014-09-14 13:05:58
Output for 7.0.0
2014-09-08 15:30:31 2014-09-14 15:30:31
Output for 5.6.21
2014-09-08 22:18:29 2014-09-14 22:18:29
Output for 5.6.20
2014-09-08 11:42:58 2014-09-14 11:42:58
Output for 5.6.19
2014-09-08 00:40:00 2014-09-14 00:40:00
Output for 5.6.18
2014-09-08 12:45:01 2014-09-14 12:45:01
Output for 5.6.17
2014-09-08 06:48:02 2014-09-14 06:48:02
Output for 5.6.16
2014-09-08 17:15:48 2014-09-14 17:15:48
Output for 5.6.15
2014-09-08 18:08:35 2014-09-14 18:08:35
Output for 5.6.14
2014-09-08 20:44:46 2014-09-14 20:44:46
Output for 5.6.13
2014-09-08 00:41:42 2014-09-14 00:41:42
Output for 5.6.12
2014-09-08 13:45:35 2014-09-14 13:45:35
Output for 5.6.11
2014-09-08 21:02:13 2014-09-14 21:02:13
Output for 5.6.10
2014-09-08 22:40:51 2014-09-14 22:40:51
Output for 5.6.9
2014-09-08 03:52:18 2014-09-14 03:52:18
Output for 5.6.8
2014-09-08 11:34:57 2014-09-14 11:34:57
Output for 5.6.7
2014-09-08 22:51:57 2014-09-14 22:51:57
Output for 5.5.35
2014-09-08 01:42:45 2014-09-14 01:42:45
Output for 5.5.34
2014-09-08 17:40:00 2014-09-14 17:40:00
Output for 5.5.33
2014-09-08 12:59:00 2014-09-14 12:59:00
Output for 5.5.32
2014-09-08 18:41:47 2014-09-14 18:41:47
Output for 5.5.31
2014-09-08 09:40:07 2014-09-14 09:40:07
Output for 5.5.30
2014-09-08 20:10:00 2014-09-14 20:10:00
Output for 5.5.29
2014-09-08 14:42:06 2014-09-14 14:42:06
Output for 5.5.28
2014-09-08 17:03:11 2014-09-14 17:03:11
Output for 5.5.27
2014-09-08 19:31:35 2014-09-14 19:31:35
Output for 5.5.26
2014-09-08 01:09:28 2014-09-14 01:09:28
Output for 5.5.25
2014-09-08 07:09:57 2014-09-14 07:09:57
Output for 5.5.24
2014-09-08 14:35:56 2014-09-14 14:35:56
Output for 5.4.45
2014-09-08 13:26:00 2014-09-14 13:26:00
Output for 5.4.44
2014-09-08 13:25:54 2014-09-14 13:25:54
Output for 5.4.43
2014-09-08 13:25:42 2014-09-14 13:25:42
Output for 5.4.42
2014-09-08 13:25:36 2014-09-14 13:25:36
Output for 5.4.41
2014-09-08 13:25:28 2014-09-14 13:25:28
Output for 5.4.40
2014-09-08 13:25:20 2014-09-14 13:25:20
Output for 5.4.39
2014-09-08 13:25:15 2014-09-14 13:25:15
Output for 5.4.38
2014-09-08 08:40:53 2014-09-14 08:40:53
Output for 5.4.37
2014-09-08 08:40:46 2014-09-14 08:40:46
Output for 5.4.34 - 5.4.36
2014-09-08 08:40:45 2014-09-14 08:40:45
Output for 5.4.32
2014-09-08 07:56:26 2014-09-14 07:56:26
Output for 5.4.11 - 5.4.31
2014-09-08 07:56:27 2014-09-14 07:56:27
Output for 5.3.20 - 5.3.29, 5.4.0 - 5.4.10
2014-09-08 07:56:28 2014-09-14 07:56:28
Output for 5.2.16 - 5.2.17, 5.3.0 - 5.3.19
2014-09-08 07:56:29 2014-09-14 07:56:29
Output for 5.2.0 - 5.2.15
2014-09-08 07:56:30 2014-09-14 07:56:30
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/DZN2f on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/DZN2f on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/DZN2f on line 3

preferences:
236.24 ms | 401 KiB | 328 Q