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'));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.20.0080.01017.50
8.5.10.0110.00617.14
8.4.170.0140.00920.66
8.4.160.0140.00722.40
8.4.140.0110.01217.98
8.4.90.0120.01018.16
8.3.300.0140.00918.88
8.3.290.0100.01020.33
8.3.180.0100.00717.07
8.3.50.0090.01316.92

preferences:
29.2 ms | 403 KiB | 5 Q