3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Rfc7231Formatter { public static function format(DateTimeImmutable $dt): string { return $dt->setTimezone(new DateTimeZone('GMT'))->format('D, d M Y H:i:s') . ' GMT'; } } echo Rfc7231Formatter::format(new DateTimeImmutable('2026-01-21 12:23:34.567890+01:00')); echo PHP_EOL; echo Rfc7231Formatter::format(new DateTimeImmutable('2026-01-21 12:23:34.567890-08:00'));
Output for git.master, git.master_jit
Wed, 21 Jan 2026 11:23:34 GMT Wed, 21 Jan 2026 20:23:34 GMT

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
26.93 ms | 405 KiB | 5 Q