3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new DateTime(now); print_r($x);
based on 8rHUn
Output for 7.2.0
Warning: Use of undefined constant now - assumed 'now' (this will throw an Error in a future version of PHP) in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.003444 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.10
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.003762 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.005652 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.012706 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.009111 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.003990 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.20
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-09-10 18:03:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-05-03 08:37:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-02 21:33:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-10 07:54:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-18 08:28:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-22 14:14:15.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-23 19:14:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-26 20:50:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-05-02 03:57:43.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-09 20:27:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-07 16:02:16.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-14 23:47:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-19 12:46:41.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-27 22:36:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-28 23:29:11.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-02 02:03:17.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-15 05:58:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-19 19:37:35.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-23 02:44:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-25 04:27:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-27 09:25:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-29 17:26:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.7
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-05-25 12:44:42.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-05-22 07:40:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-10 22:49:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-08 18:50:40.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-17 01:39:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-03-20 15:33:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-01 01:37:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-16 20:03:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-20 22:44:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-22 01:14:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-26 06:53:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-04-28 12:57:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2016-05-23 20:05:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.45
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.44
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:51.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.43
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.41 - 5.4.42
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.39 - 5.4.40
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.37 - 5.4.38
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.35 - 5.4.36
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.32 - 5.4.34
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.31
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.28 - 5.4.29
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:58 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.25 - 5.4.27
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:59 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.28, 5.4.21 - 5.4.24
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:03:00 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.18 - 5.4.20
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:03:01 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.25 - 5.3.27, 5.4.14 - 5.4.17
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:03:02 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.20 - 5.3.24, 5.4.9 - 5.4.13
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:03:03 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.17 - 5.3.19, 5.4.7 - 5.4.8
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:03:04 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.29
Notice: Use of undefined constant now - assumed 'now' in /in/OK6f9 on line 2 DateTime Object ( [date] => 2015-11-18 08:02:57 [timezone_type] => 3 [timezone] => Europe/Amsterdam )