3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use \Datetime; $lastMonth = new Datetime('-1 month'); print_r($lastMonth);
based on AK2XI
Output for 7.2.0
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.044571 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.10
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.032659 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.003107 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.013560 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.005433 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.003927 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.28, 7.0.20
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2015-09-27 16:20:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-04-03 17:54:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-03 06:21:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-10 18:06:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-18 18:54:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-23 01:18:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-24 05:03:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-27 06:59:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-04-02 13:04:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-10 05:21:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-08 02:16:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-15 10:55:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-19 22:39:25.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-28 07:46:47.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-29 08:37:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-02 10:31:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-15 14:51:40.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-20 05:20:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-24 11:35:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-25 13:45:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-27 18:54:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTime Object ( [date] => 2016-03-30 03:48:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-04-22 19:29:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-11 07:33:25.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-09 04:53:42.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-17 14:36:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-02-21 01:38:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-01 10:31:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-17 05:15:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-21 08:33:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-22 10:22:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-26 16:28:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
Warning: The use statement with non-compound name 'Datetime' has no effect in /in/0DHh9 on line 3 DateTime Object ( [date] => 2016-03-28 23:19:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
DateTime Object ( [date] => 2016-04-24 05:54:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.43 - 5.4.45
DateTime Object ( [date] => 2015-09-27 16:20:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.35 - 5.4.42
DateTime Object ( [date] => 2015-09-27 16:20:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.34
DateTime Object ( [date] => 2015-09-27 16:20:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.26 - 5.4.29
DateTime Object ( [date] => 2015-09-27 16:20:28 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.18 - 5.4.25
DateTime Object ( [date] => 2015-09-27 16:20:29 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.8 - 5.4.17
DateTime Object ( [date] => 2015-09-27 16:20:30 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.29 - 5.4.7
DateTime Object ( [date] => 2015-09-27 16:20:31 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.21 - 5.3.28
DateTime Object ( [date] => 2015-09-27 16:20:32 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.19 - 5.3.20
DateTime Object ( [date] => 2015-09-27 16:20:33 [timezone_type] => 3 [timezone] => Europe/Amsterdam )