3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime(); $date->setTimeZone(new DateTimeZone('GMT')); //Wed, 20 Dec 2023 23:28:11 GMT echo $date->format(DATE_RFC7231)."\n"; $date->setTimeZone(new DateTimeZone('Europe/Tallinn')); //Thu, 21 Dec 2023 01:28:20 GMT echo $date->format(DATE_RFC7231);
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Wed, 20 Dec 2023 23:52:59 GMT Thu, 21 Dec 2023 01:52:59 GMT

preferences:
71.31 ms | 406 KiB | 5 Q