3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tz = new DateTimeZone("Pacific/Chatham"); $utcNow = new DateTimeImmutable("now", new DateTimeZone("UTC")); var_dump($tz->getOffset($utcNow)%60);
based on equa4
Output for 5.6.3 - 5.6.30, 7.0.0 - 7.2.6
int(0)
Output for hhvm-3.15.4
Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTime, DateTimeImmutable given in /in/351Rd on line 5 int(0)
Output for 5.6.0 - 5.6.2
Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTime, object given in /in/351Rd on line 5 int(0)