3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = new DateTime(); $sub = new DateInterval('PT10H'); $time->sub($sub); echo $time->format('c');
based on GRjqR
Output for 5.6.28, 7.0.14 - 7.1.0
2014-08-06T05:25:45+02:00
Output for 7.0.6
2016-05-03T07:16:12+02:00
Output for 7.0.5
2016-04-02T19:45:06+02:00
Output for 7.0.4
2016-03-10T07:26:20+01:00
Output for 7.0.3
2016-03-18T08:12:27+01:00
Output for 7.0.2
2016-03-22T14:25:52+01:00
Output for 7.0.1
2016-03-23T18:25:22+01:00
Output for 7.0.0
2016-03-26T19:21:59+01:00
Output for 5.6.21
2016-05-02T02:26:26+02:00
Output for 5.6.20
2016-04-09T18:43:34+02:00
Output for 5.6.19
2016-03-07T15:34:17+01:00
Output for 5.6.18
2016-03-15T00:05:58+01:00
Output for 5.6.17
2016-03-19T11:58:48+01:00
Output for 5.6.16
2016-03-27T21:09:33+02:00
Output for 5.6.15
2016-03-28T22:00:29+02:00
Output for 5.6.14
2016-04-01T23:55:29+02:00
Output for 5.6.13
2016-04-15T04:14:52+02:00
Output for 5.6.12
2016-04-19T18:42:14+02:00
Output for 5.6.11
2016-04-24T00:54:35+02:00
Output for 5.6.10
2016-04-25T03:08:19+02:00
Output for 5.6.9
2016-04-27T08:17:18+02:00
Output for 5.6.8
2016-04-29T17:09:59+02:00
Output for 5.5.35
2016-05-22T08:27:48+02:00
Output for 5.5.34
2016-04-10T20:57:07+02:00
Output for 5.5.33
2016-03-08T18:13:13+01:00
Output for 5.5.32
2016-03-17T03:50:31+01:00
Output for 5.5.31
2016-03-20T14:54:49+01:00
Output for 5.5.30
2016-03-31T23:53:32+02:00
Output for 5.5.29
2016-04-16T18:39:48+02:00
Output for 5.5.28
2016-04-20T21:53:42+02:00
Output for 5.5.27
2016-04-21T23:46:06+02:00
Output for 5.5.26
2016-04-26T05:49:42+02:00
Output for 5.5.25
2016-04-28T12:40:48+02:00
Output for 5.5.24
2016-05-23T19:21:01+02:00
Output for 5.4.45
2015-09-09T08:40:57+02:00
Output for 5.4.44
2015-08-09T06:47:15+02:00
Output for 5.4.43
2015-08-09T06:47:09+02:00
Output for 5.4.42
2015-08-09T06:47:08+02:00
Output for 5.4.41
2015-08-09T06:47:06+02:00
Output for 5.4.40
2015-08-09T06:47:02+02:00
Output for 5.4.39
2015-08-09T06:47:01+02:00
Output for 5.4.38
2015-02-22T05:40:38+01:00
Output for 5.4.37
2015-02-03T05:04:52+01:00
Output for 5.4.36
2015-02-03T05:04:51+01:00
Output for 5.4.35
2014-11-14T00:50:37+01:00
Output for 5.4.34
2014-11-13T01:25:31+01:00
Output for 5.4.32
2014-08-28T03:27:52+02:00
Output for 5.4.30 - 5.4.31
2014-08-06T05:25:49+02:00
Output for 5.4.10 - 5.4.29
2014-08-06T05:25:50+02:00
Output for 5.3.17 - 5.3.28, 5.4.0 - 5.4.9
2014-08-06T05:25:51+02:00
Output for 5.3.29
2014-08-28T03:27:51+02:00
Output for 5.3.0 - 5.3.16
2014-08-06T05:25:52+02:00
Output for 5.2.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/HVvck on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/HVvck on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/HVvck on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/HVvck on line 2