3v4l.org

run code in 200+ php & hhvm versions
<?php $tz = new DateTimeZone('Europe/Amsterdam'); $utc = new DateTimeZone('UTC'); var_dump($tz == $utc); var_dump($tz === $utc); var_dump($tz, $utc); var_dump($tz == $utc); var_dump($tz === $utc);
Output for 7.1.15 - 7.1.30, 7.2.3 - 7.4.0alpha2
bool(true) bool(false) object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTimeZone)#2 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } bool(true) bool(false)
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.1.14, 7.2.0 - 7.2.2
bool(true) bool(false) object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTimeZone)#2 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } bool(false) bool(false)
Output for hhvm-3.15.4 - 3.22.0
bool(true) bool(false) object(DateTimeZone)#1 (0) { } object(DateTimeZone)#2 (0) { } bool(true) bool(false)