3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $old = ['created' => new \DateTime()]; $new = ['created' => new \DateTime('+1 minute')]; $changeset = array_merge($old, $new); var_dump($changeset, $changeset['created'] instanceof \DateTime);
based on 4N22i
Output for 7.2.0
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.004171" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.1.10
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.003961" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.1.7
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.002918" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.1.6
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.012873" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.1.5
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.005723" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.1.0
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.003809" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.28, 7.0.20
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.6
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-03 18:08:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.5
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-03 06:34:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.4
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-10 18:20:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.3
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 19:25:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.2
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 01:33:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.1
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-24 05:15:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 7.0.0
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 07:12:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.21
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-02 13:17:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.20
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 05:33:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.19
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 02:30:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.18
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-15 11:13:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.17
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-19 22:53:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.16
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-28 07:59:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.15
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 08:50:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.14
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-02 10:43:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.13
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-15 15:04:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.12
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 05:33:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.11
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-24 11:49:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.10
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-25 13:58:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.9
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 19:08:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.6.8
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 04:01:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.35
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-22 19:44:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.34
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-11 07:45:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.33
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-09 05:09:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.32
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-17 14:50:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.31
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 01:52:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.30
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 10:44:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.29
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-17 05:28:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.28
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 08:46:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.27
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 10:35:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.26
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-26 16:41:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.25
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-28 23:32:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.5.24
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 06:07:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.41 - 5.4.45
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.34 - 5.4.40
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.30 - 5.4.32
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-02 15:04:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.25 - 5.4.29
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-02 15:04:23" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.18 - 5.4.24
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-02 15:04:24" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.11 - 5.4.17
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-02 15:04:25" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.2 - 5.4.10
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-02 15:04:26" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.4.0 - 5.4.1
array(1) { ["created"]=> object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-02 15:04:27" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } bool(true)
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/T1BcN on line 3
Process exited with code 255.