3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new DateTime(); $b = new DateTime(); var_dump(PHP_VERSION, $a, $b, $a == $b);
Output for 7.1.7
string(5) "7.1.7" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:41.005407" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:41.005422" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.6
string(5) "7.1.6" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:44.038643" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:44.038654" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.5
string(5) "7.1.5" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:47.040194" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:47.040248" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.4
string(5) "7.1.4" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:52.031895" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:52.031943" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.3
string(5) "7.1.3" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(true)
Output for 7.1.2
string(5) "7.1.2" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:02:00.068117" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:02:00.068142" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.1
string(5) "7.1.1" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:02:05.032990" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:02:05.033014" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)
Output for 7.1.0
string(5) "7.1.0" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-10 01:01:02.037994" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-10 01:01:02.038020" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false)