3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable('now', new DateTimeZone('Pacific/Midway')); $date2 = new DateTimeImmutable('now', new DateTimeZone('US/Samoa')); echo $date->format('Y-m-d H:i:s e') . PHP_EOL; echo $date2->format('Y-m-d H:i:s e') . PHP_EOL; var_dump($date == $date2);
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.26, 8.0.0 - 8.0.13, 8.1rc1 - rc3
2020-08-07 12:36:16 Pacific/Midway 2020-08-07 12:36:16 US/Samoa bool(false)

preferences:
39.17 ms | 460 KiB | 5 Q