3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyJobHandlerException extends Exception { public function __construct(string $message, public readonly int $jobId, ?\Throwable $previous = null) { parent::__construct($message, previous: $previous); } } function execute_job(int $jobId) { throw new \Exception('execute_job failed'); } function runner() { $jobId = 1; try { execute_job($jobId); } catch (\Throwable $e) { throw new MyJobHandlerException('Wrapping the exception', $jobId, $e); } } runner();

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.4.120.0100.01124.01
8.4.110.0120.00818.95
8.4.100.0450.00817.68
8.4.90.0400.00917.80
8.4.80.0270.00718.25
8.4.70.0330.00517.65
8.4.60.0190.00418.01
8.4.50.0230.00417.74
8.4.40.0270.01317.37
8.4.30.0430.01017.55
8.4.20.0440.00917.63
8.4.10.0380.01217.69
8.3.250.0030.00518.85
8.3.240.0130.00616.98
8.3.230.0360.01016.41
8.3.220.0370.00516.59
8.3.210.0320.00316.88
8.3.200.0280.00716.73
8.3.190.0180.00416.49
8.3.180.0380.00916.80
8.3.170.0170.00716.56
8.3.160.0170.00616.85
8.3.150.0190.00516.25
8.3.140.0170.00616.75
8.3.130.0150.00716.86
8.3.120.0250.00616.25
8.3.110.0190.00616.52
8.3.100.0210.00216.73
8.3.90.0180.00516.56
8.3.80.0230.00616.53
8.3.70.0360.00816.43
8.3.60.0300.00416.39
8.3.50.0440.00916.48
8.3.40.0470.00917.70
8.3.30.0400.00517.45
8.3.20.0330.01317.74
8.3.10.0310.00517.61
8.3.00.0320.00517.70
8.2.290.0230.00816.71
8.2.280.0310.00916.61
8.2.270.0310.00416.63
8.2.260.0300.01316.67
8.2.250.0310.01316.33
8.2.240.0300.01216.32
8.2.230.0360.00816.68
8.2.220.0320.01116.42
8.2.210.0270.00816.43
8.2.200.0310.00516.52
8.2.190.0320.00616.53
8.2.180.0300.00716.73
8.2.170.0330.00517.90
8.2.160.0230.00517.81
8.2.150.0340.01117.59
8.2.140.0280.00317.47
8.2.130.0350.00917.56
8.2.120.0330.00817.62
8.2.110.0380.00817.42
8.2.100.0230.00817.59
8.2.90.0210.00617.57
8.2.80.0280.00417.44
8.2.70.0350.00517.50
8.2.60.0380.00617.57
8.2.50.0360.01017.26
8.2.40.0500.01017.74
8.2.30.0310.00917.44
8.2.20.0330.00717.62
8.2.10.0290.00717.80
8.2.00.0280.00717.57

preferences:
35.28 ms | 403 KiB | 5 Q