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));
based on pGKsS
Output for 5.6.3 - 5.6.30, 7.0.0 - 7.2.6
int(45900)
Output for hhvm-3.15.4
Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTime, DateTimeImmutable given in /in/equa4 on line 5 bool(false)
Output for 5.6.0 - 5.6.2
Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTime, object given in /in/equa4 on line 5 bool(false)