3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); //$di = new DateInterval("PT5M"); $date->sub(new DateInterval("PT5M")); echo $date->format(DateTime::RFC850);
based on Yum8F
Output for 5.6.28, 7.0.14 - 7.1.0
Tuesday, 07-Oct-14 17:23:24 CEST
Output for 7.0.6
Tuesday, 03-May-16 10:14:57 CEST
Output for 7.0.5
Saturday, 02-Apr-16 23:01:49 CEST
Output for 7.0.4
Thursday, 10-Mar-16 09:37:35 CET
Output for 7.0.3
Friday, 18-Mar-16 10:17:23 CET
Output for 7.0.2
Tuesday, 22-Mar-16 16:15:54 CET
Output for 7.0.1
Wednesday, 23-Mar-16 20:51:45 CET
Output for 7.0.0
Saturday, 26-Mar-16 22:24:06 CET
Output for hhvm-3.12.0
Saturday, 12-Mar-16 12:55:05 CET
Output for hhvm-3.10.0
Wednesday, 30-Mar-16 11:59:34 CEST
Output for 5.6.21
Monday, 02-May-16 05:34:35 CEST
Output for 5.6.20
Saturday, 09-Apr-16 22:01:12 CEST
Output for 5.6.19
Monday, 07-Mar-16 17:45:15 CET
Output for 5.6.18
Tuesday, 15-Mar-16 01:50:47 CET
Output for 5.6.17
Saturday, 19-Mar-16 14:31:11 CET
Output for 5.6.16
Monday, 28-Mar-16 00:11:55 CEST
Output for 5.6.15
Tuesday, 29-Mar-16 01:16:30 CEST
Output for 5.6.14
Saturday, 02-Apr-16 03:35:41 CEST
Output for 5.6.13
Friday, 15-Apr-16 07:29:57 CEST
Output for 5.6.12
Tuesday, 19-Apr-16 21:18:07 CEST
Output for 5.6.11
Saturday, 23-Apr-16 04:20:02 CEST
Output for 5.6.10
Monday, 25-Apr-16 06:04:58 CEST
Output for 5.6.9
Wednesday, 27-Apr-16 11:03:48 CEST
Output for 5.6.8
Friday, 29-Apr-16 19:12:00 CEST
Output for 5.5.35
Sunday, 22-May-16 09:22:25 CEST
Output for 5.5.34
Monday, 11-Apr-16 00:20:42 CEST
Output for 5.5.33
Tuesday, 08-Mar-16 20:42:12 CET
Output for 5.5.32
Thursday, 17-Mar-16 03:24:56 CET
Output for 5.5.31
Sunday, 20-Mar-16 17:16:32 CET
Output for 5.5.30
Friday, 01-Apr-16 03:13:13 CEST
Output for 5.5.29
Saturday, 16-Apr-16 21:37:06 CEST
Output for 5.5.28
Thursday, 21-Apr-16 00:33:38 CEST
Output for 5.5.27
Friday, 22-Apr-16 02:51:34 CEST
Output for 5.5.26
Tuesday, 26-Apr-16 08:31:08 CEST
Output for 5.5.25
Thursday, 28-Apr-16 14:49:58 CEST
Output for 5.5.24
Monday, 23-May-16 22:10:35 CEST
Output for 5.4.45
Sunday, 20-Sep-15 10:44:23 CEST
Output for 5.4.44
Monday, 17-Aug-15 04:54:19 CEST
Output for 5.4.43
Monday, 17-Aug-15 04:54:14 CEST
Output for 5.4.42
Monday, 17-Aug-15 04:54:12 CEST
Output for 5.4.41
Monday, 17-Aug-15 04:54:10 CEST
Output for 5.4.39 - 5.4.40
Monday, 17-Aug-15 04:54:04 CEST
Output for 5.4.38
Sunday, 15-Mar-15 16:34:23 CET
Output for 5.4.37
Sunday, 15-Mar-15 16:34:16 CET
Output for 5.4.35 - 5.4.36
Sunday, 15-Mar-15 16:34:15 CET
Output for 5.4.34
Sunday, 15-Mar-15 16:34:14 CET
Output for 5.4.14 - 5.4.32
Tuesday, 07-Oct-14 17:23:28 CEST
Output for 5.3.23 - 5.4.13
Tuesday, 07-Oct-14 17:23:29 CEST
Output for 5.3.1 - 5.3.22
Tuesday, 07-Oct-14 17:23:30 CEST
Output for 5.3.0
Tuesday, 07-Oct-14 17:23:31 CEST
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::sub() in /in/98pYY on line 7
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/98pYY on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/98pYY on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/98pYY on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/98pYY on line 9
Process exited with code 255.