3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $currentError; function repeateError($e) { $this->currentError = $e; $errorClass = get_class($e); throw new $errorClass($e->getMessage()); } public function show() { try { throw new \RuntimeException('Test error'); } catch (\RuntimeException $e) { $this->repeateError($e); } finally { return $this->currentError; } } } $test = new Test(); echo $test->show();

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.0110.00618.95
8.5.00.0130.00820.11
8.4.150.0030.00014.05
8.4.140.0100.01117.67
8.4.130.0050.00318.61
8.4.120.0110.00820.49
8.4.110.0070.00518.88
8.4.100.0110.00818.62
8.4.90.0160.00322.49
8.4.80.0120.00819.07
8.4.70.0120.00818.80
8.4.60.0090.01118.61
8.4.50.0070.00518.82
8.4.40.0030.00617.96
8.4.30.0090.01118.57
8.4.20.0170.00319.86
8.4.10.0040.00417.72
8.3.280.0080.01220.07
8.3.270.0090.01016.51
8.3.260.0060.00216.93
8.3.250.0160.00317.06
8.3.240.0140.00519.12
8.3.230.0080.01016.64
8.3.220.0130.00518.87
8.3.210.0030.00416.64
8.3.200.0050.00316.63
8.3.190.0100.00819.23
8.3.180.0090.01118.94
8.3.170.0090.01016.66
8.3.160.0120.00617.20
8.3.150.0090.00918.82
8.3.140.0100.01319.16
8.3.130.0060.00918.39
8.3.120.0050.01419.16
8.3.110.0060.00320.94
8.3.100.0150.00416.65
8.3.90.0040.00420.15
8.3.80.0060.00318.55
8.3.70.0070.01116.75
8.3.60.0090.01216.88
8.3.50.0130.00523.73
8.3.40.0120.00318.58
8.3.30.0070.00718.91
8.3.20.0040.00420.94
8.3.10.0140.00020.15
8.3.00.0000.00820.69
8.2.290.0130.00618.99
8.2.280.0120.00718.15
8.2.270.0090.00918.58
8.2.260.0040.01116.52
8.2.250.0080.00018.66
8.2.240.0100.00718.90
8.2.230.0060.00322.58
8.2.220.0080.01124.06
8.2.210.0040.01126.77
8.2.200.0060.00618.11
8.2.190.0140.00718.29
8.2.180.0040.01118.43
8.2.170.0000.01522.96
8.2.160.0100.01021.19
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0040.00422.17
8.2.100.0060.00620.98
8.2.90.0050.00317.50
8.2.80.0040.00418.92
8.2.70.0090.00017.93
8.2.60.0030.00517.63
8.2.50.0000.00818.05
8.2.40.0020.00518.09
8.2.30.0030.00519.34
8.2.20.0000.00718.00
8.2.10.0000.00819.30
8.2.00.0030.00619.35
8.1.330.0100.01016.28
8.1.320.0100.01016.37
8.1.310.0150.00416.79
8.1.300.0030.00620.25
8.1.290.0060.00318.88
8.1.280.0100.00725.92
8.1.270.0060.00322.07
8.1.260.0030.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00423.68
8.1.230.0080.00319.12
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0050.00319.14
8.1.180.0060.00318.10
8.1.170.0000.00817.62
8.1.160.0060.00319.05
8.1.150.0070.00018.88
8.1.140.0000.00718.95
8.1.130.0030.00321.97
8.1.120.0080.00017.45
8.1.110.0040.00417.47
8.1.100.0050.00217.44
8.1.90.0040.00417.45
8.1.80.0000.00817.39
8.1.70.0000.00717.44
8.1.60.0000.00817.54
8.1.50.0000.00817.46
8.1.40.0040.00417.40
8.1.30.0040.00417.63
8.1.20.0030.00617.70
8.1.10.0050.00217.54
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0040.00416.59
8.0.280.0070.00018.37
8.0.270.0050.00317.99
8.0.260.0000.00718.44
8.0.250.0000.00716.99
8.0.240.0060.00017.02
8.0.230.0000.00716.82
8.0.220.0030.00616.85
8.0.210.0080.00016.80
8.0.200.0000.00616.95
8.0.190.0000.00916.87
8.0.180.0040.00416.95
8.0.170.0000.00916.91
8.0.160.0000.00716.90
8.0.150.0000.00816.89
8.0.140.0070.00016.93
8.0.130.0060.00013.45
8.0.120.0070.00016.80
8.0.110.0000.00716.77
8.0.100.0000.00716.82
8.0.90.0030.00616.82
8.0.80.0080.01316.96
8.0.70.0040.00416.81
8.0.60.0070.00016.87
8.0.50.0040.00416.90
8.0.30.0090.00917.19
8.0.20.0090.00917.42
8.0.10.0000.00817.05
8.0.00.0060.01216.90
7.4.330.0000.00615.55
7.4.320.0060.00016.49
7.4.300.0030.00316.43
7.4.290.0030.00316.48
7.4.280.0030.00516.60
7.4.270.0070.00016.61
7.4.260.0070.00013.28
7.4.250.0050.00316.37
7.4.240.0030.00416.58
7.4.230.0030.00316.53
7.4.220.0020.00516.53
7.4.210.0030.01116.57
7.4.200.0050.00316.66
7.4.130.0110.00716.58
7.4.120.0210.00016.68
7.4.110.0120.00616.51
7.4.100.0090.00616.61
7.4.90.0100.00716.59
7.4.80.0120.00919.39
7.4.70.0130.00316.50
7.4.60.0090.00916.59
7.4.50.0040.01116.35
7.4.40.0140.00716.44
7.4.30.0090.01116.57
7.4.20.0090.01116.52
7.4.10.0030.01516.64
7.4.00.0060.01016.62
7.3.330.0040.00416.30
7.3.320.0050.00013.40
7.3.310.0000.00716.54
7.3.300.0030.00616.44
7.3.290.0110.00716.42
7.3.280.0000.01416.47
7.3.260.0140.00316.58
7.3.240.0110.00616.55
7.3.230.0150.00316.44
7.3.210.0030.01316.57
7.3.200.0120.00816.37
7.3.190.0130.00316.67
7.3.180.0030.01316.55
7.3.170.0130.00916.56
7.3.160.0080.00916.61
7.3.150.0070.01116.39
7.3.140.0100.00716.56
7.3.130.0050.01316.51
7.3.120.0080.00816.57
7.3.110.0080.01016.33
7.3.100.0090.00716.36
7.3.90.0120.00916.49
7.3.80.0110.01016.51
7.3.70.0110.00616.56
7.3.60.0080.01316.41
7.3.50.0090.01116.43
7.3.40.0150.00416.46
7.3.30.0160.00516.42
7.3.20.0070.01116.44
7.3.10.0080.01116.43
7.3.00.0140.00516.55
7.2.330.0070.01116.80
7.2.310.0080.00716.61
7.2.300.0150.00616.71
7.2.290.0100.01016.49
7.2.280.0110.00916.72
7.2.270.0090.01016.71
7.2.260.0080.01216.72
7.2.250.0080.01116.72
7.2.240.0110.00516.48
7.2.230.0100.01216.75
7.2.220.0130.00816.76
7.2.210.0100.01116.67
7.2.200.0090.01116.52
7.2.190.0090.01116.71
7.2.180.0050.01816.67
7.2.170.0130.00716.55
7.2.160.0050.01116.56
7.2.150.0080.01116.67
7.2.140.0100.01116.69
7.2.130.0100.01016.64
7.2.120.0130.01216.74
7.2.110.0110.01216.70
7.2.100.0110.01116.79
7.2.90.0060.01416.63
7.2.80.0200.00516.67
7.2.70.0080.01016.59
7.2.60.0150.00716.75
7.2.50.0100.01316.65
7.2.40.0150.00816.81
7.2.30.0120.00916.87
7.2.20.0100.01016.67
7.2.10.0110.00716.82
7.2.00.0080.01216.59

preferences:
28.2 ms | 403 KiB | 5 Q