3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(version_compare(PHP_VERSION, '5.3') < 0) { echo 'n/a'; die(); } $a = new DateTime('now', new DateTimeZone('Europe/Rome')); $b = new DateTime('now', new DateTimeZone('Pacific/Fiji')); var_export($a); var_export($b);
based on SaFa4
Output for 7.1.0
DateTime::__set_state(array( 'date' => '2014-08-26 15:11:17.004178', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2014-08-27 01:11:17.004203', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.28, 7.0.14
DateTime::__set_state(array( 'date' => '2014-08-26 15:11:17.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2014-08-27 01:11:17.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.6
DateTime::__set_state(array( 'date' => '2016-05-03 09:46:56.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-05-03 19:46:56.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.5
DateTime::__set_state(array( 'date' => '2016-04-02 22:38:21.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-03 08:38:21.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.4
DateTime::__set_state(array( 'date' => '2016-03-10 09:11:15.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-10 20:11:15.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.3
DateTime::__set_state(array( 'date' => '2016-03-18 09:48:32.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-18 20:48:32.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.2
DateTime::__set_state(array( 'date' => '2016-03-22 15:42:18.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-23 02:42:18.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.1
DateTime::__set_state(array( 'date' => '2016-03-23 20:27:07.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-24 07:27:07.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 7.0.0
DateTime::__set_state(array( 'date' => '2016-03-26 21:59:44.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-27 08:59:44.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for hhvm-3.12.0
DateTime::__set_state(array( 'date' => '2016-03-11 22:16:42.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-12 09:16:42.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for hhvm-3.10.0
DateTime::__set_state(array( 'date' => '2016-03-30 11:18:45.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-30 21:18:45.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.21
DateTime::__set_state(array( 'date' => '2016-05-02 05:08:09.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-05-02 15:08:09.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.20
DateTime::__set_state(array( 'date' => '2016-04-09 21:35:09.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-10 07:35:09.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.19
DateTime::__set_state(array( 'date' => '2016-03-07 17:19:04.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-08 04:19:04.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.18
DateTime::__set_state(array( 'date' => '2016-03-15 01:13:43.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-15 12:13:43.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.17
DateTime::__set_state(array( 'date' => '2016-03-19 14:03:51.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-20 01:03:51.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.16
DateTime::__set_state(array( 'date' => '2016-03-27 23:45:04.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-28 09:45:04.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.15
DateTime::__set_state(array( 'date' => '2016-03-29 00:50:14.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-29 10:50:14.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.14
DateTime::__set_state(array( 'date' => '2016-04-02 03:11:05.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-02 13:11:05.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.13
DateTime::__set_state(array( 'date' => '2016-04-15 07:05:42.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-15 17:05:42.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.12
DateTime::__set_state(array( 'date' => '2016-04-19 20:50:02.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-20 06:50:02.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.11
DateTime::__set_state(array( 'date' => '2016-04-23 03:54:02.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-23 13:54:02.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.10
DateTime::__set_state(array( 'date' => '2016-04-25 05:37:56.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-25 15:37:56.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.9
DateTime::__set_state(array( 'date' => '2016-04-27 10:35:47.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-27 20:35:47.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.6.8
DateTime::__set_state(array( 'date' => '2016-04-29 18:40:30.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-30 04:40:30.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.35
DateTime::__set_state(array( 'date' => '2016-05-22 08:51:02.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-05-22 18:51:02.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.34
DateTime::__set_state(array( 'date' => '2016-04-10 23:55:25.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-11 09:55:25.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.33
DateTime::__set_state(array( 'date' => '2016-03-08 20:16:05.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-09 07:16:05.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.32
DateTime::__set_state(array( 'date' => '2016-03-17 02:56:33.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-17 13:56:33.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.31
DateTime::__set_state(array( 'date' => '2016-03-20 16:49:39.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-03-21 03:49:39.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.30
DateTime::__set_state(array( 'date' => '2016-04-01 02:45:56.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-01 12:45:56.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.29
DateTime::__set_state(array( 'date' => '2016-04-16 21:11:02.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-17 07:11:02.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.28
DateTime::__set_state(array( 'date' => '2016-04-20 23:55:05.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-21 09:55:05.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.27
DateTime::__set_state(array( 'date' => '2016-04-22 02:24:49.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-22 12:24:49.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.26
DateTime::__set_state(array( 'date' => '2016-04-26 08:04:47.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-26 18:04:47.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.25
DateTime::__set_state(array( 'date' => '2016-04-28 14:22:48.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-04-29 00:22:48.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.5.24
DateTime::__set_state(array( 'date' => '2016-05-23 21:44:00.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2016-05-24 07:44:00.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.45
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:38.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:38.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.41 - 5.4.44
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:39.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:39.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.37 - 5.4.40
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:40.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:40.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.34 - 5.4.36
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:41.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:41.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.30 - 5.4.32
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:42.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:42.000000', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.29
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:42', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:42', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.25 - 5.4.28
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:43', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:43', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.21 - 5.4.24
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:44', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:44', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.18 - 5.4.20
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:45', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:45', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.11 - 5.4.17
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:46', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:46', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.7 - 5.4.10
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:47', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:47', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.4 - 5.4.6
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:48', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:48', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.4.0 - 5.4.3
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:49', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:49', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.26 - 5.3.29
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:50', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:50', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.22 - 5.3.25
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:51', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:51', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.16 - 5.3.21
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:52', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:52', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.13 - 5.3.15
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:53', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:53', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.9 - 5.3.12
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:54', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:54', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.5 - 5.3.8
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:55', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:55', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.2 - 5.3.4
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:56', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:56', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 5.3.0 - 5.3.1
DateTime::__set_state(array( 'date' => '2015-10-14 02:47:57', 'timezone_type' => 3, 'timezone' => 'Europe/Rome', ))DateTime::__set_state(array( 'date' => '2015-10-14 12:47:57', 'timezone_type' => 3, 'timezone' => 'Pacific/Fiji', ))
Output for 4.3.0 - 5.2.17
n/a