3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new DateTime())->modify('first day of this month')->format('Y-m-d H:i:s');
based on Nq73a
Output for 5.6.28, 7.0.20 - 7.2.0
2016-01-01 10:42:58
Output for 7.0.6
2016-05-01 13:57:02
Output for 7.0.5
2016-04-01 09:53:17
Output for 7.0.4
2016-03-01 22:00:50
Output for 7.0.3
2016-03-01 23:35:30
Output for 7.0.2
2016-03-01 05:43:09
Output for 7.0.1
2016-03-01 08:45:41
Output for 7.0.0
2016-03-01 10:38:34
Output for 5.6.21
2016-05-01 16:47:51
Output for 5.6.20
2016-04-01 08:55:42
Output for 5.6.19
2016-03-01 06:10:56
Output for 5.6.18
2016-03-01 15:09:35
Output for 5.6.17
2016-03-01 02:41:36
Output for 5.6.16
2016-03-01 11:28:25
Output for 5.6.15
2016-03-01 12:18:03
Output for 5.6.14
2016-04-01 18:00:26
Output for 5.6.13
2016-04-01 18:39:19
Output for 5.6.12
2016-04-01 09:09:52
Output for 5.6.11
2016-04-01 15:35:51
Output for 5.6.10
2016-04-01 17:41:34
Output for 5.6.9
2016-04-01 23:09:41
Output for 5.6.8
2016-04-01 07:36:06
Output for 5.5.35
2016-05-01 02:52:48
Output for 5.5.34
2016-04-01 11:10:34
Output for 5.5.33
2016-03-01 09:16:00
Output for 5.5.32
2016-03-01 19:08:18
Output for 5.5.31
2016-03-01 05:54:29
Output for 5.5.30
2016-04-01 14:09:23
Output for 5.5.29
2016-04-01 08:57:13
Output for 5.5.28
2016-04-01 12:29:27
Output for 5.5.27
2016-04-01 14:07:02
Output for 5.5.26
2016-04-01 20:23:02
Output for 5.5.25
2016-04-01 03:49:36
Output for 5.5.24
2016-05-01 10:21:18
Output for 5.4.45
2016-01-01 10:43:00
Output for 5.4.44
2016-01-01 10:43:01
Output for 5.4.41 - 5.4.43
2016-01-01 10:43:02
Output for 5.4.40
2016-01-01 10:43:03
Output for 5.4.38 - 5.4.39
2016-01-01 10:43:04
Output for 5.4.36 - 5.4.37
2016-01-01 10:43:05
Output for 5.4.34 - 5.4.35
2016-01-01 10:43:06
Output for 5.4.30 - 5.4.32
2016-01-01 10:43:07
Output for 5.4.26 - 5.4.29
2016-01-01 10:43:08
Output for 5.4.23 - 5.4.25
2016-01-01 10:43:09
Output for 5.4.20 - 5.4.22
2016-01-01 10:43:10
Output for 5.4.17 - 5.4.19
2016-01-01 10:43:11
Output for 5.4.13 - 5.4.16
2016-01-01 10:43:12
Output for 5.4.12
2016-01-01 10:43:13
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/XS7FU on line 3
Process exited with code 255.