3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $d = new \DateTime(); $d->modify('last month'); echo $d->format('c');
Output for 5.6.28, 7.0.14 - 7.1.0
2013-06-29T17:38:12+02:00
Output for 7.0.6
2016-04-03T00:09:19+02:00
Output for 7.0.5
2016-03-02T13:43:52+01:00
Output for 7.0.4
2016-02-09T22:38:45+01:00
Output for 7.0.3
2016-02-17T23:02:34+01:00
Output for 7.0.2
2016-02-21T09:46:12+01:00
Output for 7.0.1
2016-02-23T09:25:00+01:00
Output for 7.0.0
2016-02-26T12:32:53+01:00
Output for hhvm-3.12.0
2016-02-11T02:06:32+01:00
Output for hhvm-3.10.0
2016-02-29T16:38:58+01:00
Output for 5.6.21
2016-04-01T19:15:17+02:00
Output for 5.6.20
2016-03-09T09:00:06+01:00
Output for 5.6.19
2016-02-06T19:52:49+01:00
Output for 5.6.18
2016-02-14T08:00:21+01:00
Output for 5.6.17
2016-02-19T03:38:56+01:00
Output for 5.6.16
2016-02-27T14:16:01+01:00
Output for 5.6.15
2016-02-28T15:13:57+01:00
Output for 5.6.14
2016-03-01T17:57:54+01:00
Output for 5.6.13
2016-03-14T21:54:54+01:00
Output for 5.6.12
2016-03-19T10:57:23+01:00
Output for 5.6.11
2016-03-22T18:16:48+01:00
Output for 5.6.10
2016-03-24T19:54:33+01:00
Output for 5.6.9
2016-03-27T00:57:35+01:00
Output for 5.6.8
2016-03-29T08:33:05+02:00
Output for 5.6.7
2016-04-24T18:07:11+02:00
Output for 5.5.35
2016-04-21T22:27:20+02:00
Output for 5.5.34
2016-03-10T14:32:37+01:00
Output for 5.5.33
2016-02-08T09:45:36+01:00
Output for 5.5.32
2016-02-15T18:49:12+01:00
Output for 5.5.31
2016-02-20T06:33:21+01:00
Output for 5.5.30
2016-03-02T17:20:30+01:00
Output for 5.5.29
2016-03-16T11:55:12+01:00
Output for 5.5.28
2016-03-20T14:06:33+01:00
Output for 5.5.27
2016-03-21T16:47:22+01:00
Output for 5.5.26
2016-03-25T22:08:41+01:00
Output for 5.5.25
2016-03-28T04:15:07+02:00
Output for 5.5.24
2016-03-30T11:56:05+02:00
Output for 5.4.45
2015-11-27T04:39:30+01:00
Output for 5.4.44
2015-11-27T04:39:31+01:00
Output for 5.4.43
2015-11-27T04:39:32+01:00
Output for 5.4.41 - 5.4.42
2015-11-27T04:39:33+01:00
Output for 5.4.40
2015-11-27T04:39:34+01:00
Output for 5.4.38 - 5.4.39
2015-11-27T04:39:35+01:00
Output for 5.4.36 - 5.4.37
2015-11-27T04:39:36+01:00
Output for 5.4.34 - 5.4.35
2015-11-27T04:39:37+01:00
Output for 5.3.29, 5.4.31 - 5.4.32
2015-11-27T04:39:38+01:00
Output for 5.4.28 - 5.4.30
2015-11-27T04:39:39+01:00
Output for 5.4.25 - 5.4.27
2015-11-27T04:39:40+01:00
Output for 5.3.28, 5.4.23 - 5.4.24
2015-11-27T04:39:41+01:00
Output for 5.4.20 - 5.4.22
2015-11-27T04:39:42+01:00
Output for 5.3.27, 5.4.17 - 5.4.19
2015-11-27T04:39:43+01:00
Output for 5.3.24 - 5.3.26, 5.4.14 - 5.4.16
2015-11-27T04:39:44+01:00
Output for 5.3.20 - 5.3.23, 5.4.11 - 5.4.13
2015-11-27T04:39:45+01:00
Output for 5.3.17 - 5.3.19, 5.4.6 - 5.4.10
2015-11-27T04:39:46+01:00
Output for 5.3.12 - 5.3.16, 5.4.3 - 5.4.5
2015-11-27T04:39:47+01:00
Output for 5.3.8 - 5.3.11, 5.4.0 - 5.4.2
2015-11-27T04:39:48+01:00
Output for 5.3.4 - 5.3.7
2015-11-27T04:39:49+01:00
Output for 5.3.1 - 5.3.3
2015-11-27T04:39:50+01:00
Output for 5.3.0
2015-11-27T04:39:51+01:00
Output for 5.2.16 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 2015-11-27T04:39:49+01:00
Output for 5.2.12 - 5.2.15
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 2015-11-27T04:39:50+01:00
Output for 5.2.7 - 5.2.11
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 2015-11-27T04:39:51+01:00
Output for 5.2.2 - 5.2.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 2015-11-27T04:39:52+01:00
Output for 5.2.0 - 5.2.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 2015-11-27T04:39:53+01:00
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 Fatal error: Class 'DateTime' not found in /in/WoJNB on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 Fatal error: Cannot instantiate non-existent class: datetime in /in/WoJNB on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/WoJNB on line 4 Fatal error: Cannot instantiate non-existent class: datetime in /in/WoJNB on line 4