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.5.0
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in /in/5Oh7Z on line 5 Wed, 20 Dec 2023 23:52:59 GMT Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in /in/5Oh7Z on line 7 Thu, 21 Dec 2023 01:52:59 GMT
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14
Wed, 20 Dec 2023 23:52:59 GMT Thu, 21 Dec 2023 01:52:59 GMT

preferences:
98.76 ms | 409 KiB | 5 Q