3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $objToday = new Datetime(); echo $objToday->format('c'); $objFirstOfMonth = new DateTime('first day of this month'); echo $objFirstOfMonth->format('c');
based on r2800
Output for 5.6.28, 7.0.20 - 7.2.0
2015-11-05T09:55:26+01:002015-11-01T09:55:26+01:00
Output for 7.0.6
2016-05-03T18:22:55+02:002016-05-01T18:22:55+02:00
Output for 7.0.5
2016-04-03T06:48:24+02:002016-04-01T06:48:24+02:00
Output for 7.0.4
2016-03-10T18:34:54+01:002016-03-01T18:34:54+01:00
Output for 7.0.3
2016-03-18T19:42:50+01:002016-03-01T19:42:50+01:00
Output for 7.0.2
2016-03-23T01:50:12+01:002016-03-01T01:50:12+01:00
Output for 7.0.1
2016-03-24T05:30:25+01:002016-03-01T05:30:25+01:00
Output for 7.0.0
2016-03-27T07:26:44+02:002016-03-01T07:26:44+01:00
Output for 5.6.21
2016-05-02T13:32:10+02:002016-05-01T13:32:10+02:00
Output for 5.6.20
2016-04-10T05:47:47+02:002016-04-01T05:47:47+02:00
Output for 5.6.19
2016-03-08T02:45:58+01:002016-03-01T02:45:58+01:00
Output for 5.6.18
2016-03-15T11:29:06+01:002016-03-01T11:29:06+01:00
Output for 5.6.17
2016-03-19T23:08:50+01:002016-03-01T23:08:50+01:00
Output for 5.6.16
2016-03-28T08:14:02+02:002016-03-01T08:14:02+01:00
Output for 5.6.15
2016-03-29T09:04:46+02:002016-03-01T09:04:46+01:00
Output for 5.6.14
2016-04-02T10:56:02+02:002016-04-01T10:56:02+02:00
Output for 5.6.13
2016-04-15T15:19:39+02:002016-04-01T15:19:39+02:00
Output for 5.6.12
2016-04-20T05:48:59+02:002016-04-01T05:48:59+02:00
Output for 5.6.11
2016-04-24T12:11:04+02:002016-04-01T12:11:04+02:00
Output for 5.6.10
2016-04-25T14:14:16+02:002016-04-01T14:14:16+02:00
Output for 5.6.9
2016-04-27T19:24:20+02:002016-04-01T19:24:20+02:00
Output for 5.6.8
2016-04-30T04:16:43+02:002016-04-01T04:16:43+02:00
Output for 5.5.35
2016-05-22T20:29:28+02:002016-05-01T20:29:28+02:00
Output for 5.5.34
2016-04-11T07:59:27+02:002016-04-01T07:59:27+02:00
Output for 5.5.33
2016-03-09T05:28:11+01:002016-03-01T05:28:11+01:00
Output for 5.5.32
2016-03-17T15:24:13+01:002016-03-01T15:24:13+01:00
Output for 5.5.31
2016-03-21T02:10:12+01:002016-03-01T02:10:12+01:00
Output for 5.5.30
2016-04-01T10:58:11+02:002016-04-01T10:58:11+02:00
Output for 5.5.29
2016-04-17T05:43:20+02:002016-04-01T05:43:20+02:00
Output for 5.5.28
2016-04-21T09:02:12+02:002016-04-01T09:02:12+02:00
Output for 5.5.27
2016-04-22T10:49:24+02:002016-04-01T10:49:24+02:00
Output for 5.5.26
2016-04-26T16:56:50+02:002016-04-01T16:56:50+02:00
Output for 5.5.25
2016-04-28T23:49:20+02:002016-04-01T23:49:20+02:00
Output for 5.5.24
2016-05-24T06:22:44+02:002016-05-01T06:22:44+02:00
Output for 5.4.45
2015-11-05T09:55:39+01:002015-11-01T09:55:39+01:00
Output for 5.4.40 - 5.4.44
2015-11-05T09:55:40+01:002015-11-01T09:55:40+01:00
Output for 5.4.35 - 5.4.39
2015-11-05T09:55:41+01:002015-11-01T09:55:41+01:00
Output for 5.4.28 - 5.4.34
2015-11-05T09:55:42+01:002015-11-01T09:55:42+01:00
Output for 5.4.24 - 5.4.27
2015-11-05T09:55:43+01:002015-11-01T09:55:43+01:00
Output for 5.4.20 - 5.4.23
2015-11-05T09:55:44+01:002015-11-01T09:55:44+01:00
Output for 5.4.16 - 5.4.19
2015-11-05T09:55:45+01:002015-11-01T09:55:45+01:00
Output for 5.4.12 - 5.4.15
2015-11-05T09:55:46+01:002015-11-01T09:55:46+01:00
Output for 5.4.7 - 5.4.11
2015-11-05T09:55:47+01:002015-11-01T09:55:47+01:00
Output for 5.4.2 - 5.4.6
2015-11-05T09:55:48+01:002015-11-01T09:55:48+01:00
Output for 5.3.28 - 5.4.1
2015-11-05T09:55:49+01:002015-11-01T09:55:49+01:00
Output for 5.3.22 - 5.3.27
2015-11-05T09:55:50+01:002015-11-01T09:55:50+01:00
Output for 5.3.19 - 5.3.21
2015-11-05T09:55:51+01:002015-11-01T09:55:51+01:00