3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone("Pacific/Chatham"); var_dump($tz->getOffsetAt(time()));
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Fatal error: Uncaught Error: Call to undefined method DateTimeZone::getOffsetAt() in /in/pGKsS:4 Stack trace: #0 {main} thrown in /in/pGKsS on line 4
Process exited with code 255.

preferences:
86.54 ms | 402 KiB | 82 Q