3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); use JetBrains\PhpStorm\NoReturn; \set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool { throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); }); //\register_shutdown_function(static function (): void { // $error = \error_get_last(); // // if ($error !== null) { // throw new \ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line']); // } //}); echo (new class { #[NoReturn] public function __invoke(): string { try { trigger_error('trigger_error was called!', E_USER_ERROR); exit('exit was called!'); return 'Hello, World!'; } catch (\Throwable $e) { return $e->getMessage(); } return 'exit was skipped!'; } })();

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.10.0060.01216.79
8.5.00.0100.01220.14
8.4.150.0020.00114.05
8.4.140.0110.01017.84
8.4.130.0120.00917.89
8.4.120.0130.00822.50
8.4.110.0090.00418.73
8.4.100.0130.00817.68
8.4.90.0110.01017.96
8.4.80.0020.00618.05
8.4.70.0110.00917.87
8.4.60.0130.00518.75
8.4.50.0050.00519.02
8.4.40.0130.00617.83
8.4.30.0130.00718.73
8.4.20.0140.00719.66
8.4.10.0030.00619.49
8.3.280.0150.00618.61
8.3.270.0070.01216.74
8.3.260.0070.00416.56
8.3.250.0090.00519.13
8.3.240.0130.00916.45
8.3.230.0120.00716.78
8.3.220.0140.00518.48
8.3.210.0060.00416.48
8.3.200.0040.00416.69
8.3.190.0110.00817.29
8.3.180.0090.01017.29
8.3.170.0030.00618.98
8.3.160.0100.00717.05
8.3.150.0140.00717.01
8.3.140.0110.00416.44
8.3.130.0040.00416.68
8.3.120.0120.00619.03
8.3.110.0060.00320.94
8.3.100.0060.00316.71
8.3.90.0050.00326.77
8.3.80.0060.00316.63
8.3.70.0370.00916.58
8.3.60.0400.00716.63
8.3.50.0140.00716.89
8.3.40.0340.00717.36
8.3.30.0270.00717.63
8.3.20.0250.00917.36
8.3.10.0320.00019.13
8.3.00.0310.00917.38
8.2.290.0100.00919.09
8.2.280.0120.00918.56
8.2.270.0110.00717.22
8.2.260.0140.00017.09
8.2.250.0070.00716.80
8.2.240.0090.00018.97
8.2.230.0100.01022.58
8.2.220.0030.00624.06
8.2.210.0030.00526.77
8.2.200.0090.00016.88
8.2.190.0120.00916.63
8.2.180.0270.00618.24
8.2.170.0190.01517.75
8.2.160.0280.00917.62
8.2.150.0240.01017.50
8.2.140.0280.00817.38
8.2.130.0210.01517.50
8.2.120.0280.01019.39
8.2.110.0280.01417.12
8.2.100.0330.00717.63
8.2.90.0290.00619.16
8.2.80.0260.00617.63
8.2.70.0320.00317.38
8.2.60.0260.00917.25
8.2.50.0250.00819.13
8.2.40.0300.00317.36
8.2.30.0150.01917.50
8.2.20.0230.00719.00
8.2.10.0310.00817.35
8.2.00.0300.00317.13
8.1.330.0120.00616.83
8.1.320.0040.00616.55
8.1.310.0060.01016.79
8.1.300.0080.00020.10
8.1.290.0000.01130.84
8.1.280.0200.01216.58
8.1.270.0250.00916.98
8.1.260.0300.00318.89
8.1.250.0220.01117.00
8.1.240.0220.00617.13
8.1.230.0170.01317.23
8.1.220.0200.01217.00
8.1.210.0230.00619.02
8.1.200.0240.00517.13
8.1.190.0250.00417.25
8.1.180.0270.00618.88
8.1.170.0330.00716.75
8.1.160.0190.01317.38
8.1.150.0290.00617.09
8.1.140.0120.01619.00
8.1.130.0160.01617.10
8.1.120.0220.01017.13
8.1.110.0240.00517.10
8.1.100.0250.00418.68
8.1.90.0260.00317.25
8.1.80.0230.00717.00
8.1.70.0260.00417.22
8.1.60.0240.01017.13
8.1.50.0210.01317.13
8.1.40.0270.00517.13
8.1.30.0230.00917.46
8.1.20.0310.00717.13
8.1.10.0260.00917.12
8.1.00.0340.00316.88

preferences:
94.46 ms | 403 KiB | 5 Q