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 'test'; } } } $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.00.0100.01119.94
8.4.150.0020.00014.05
8.4.140.0130.00817.90
8.4.130.0090.01018.09
8.4.120.0100.00923.92
8.4.110.0120.00517.85
8.4.100.0040.00518.96
8.4.90.0130.00718.82
8.4.80.0040.00518.73
8.4.70.0040.00418.04
8.4.60.0080.01018.60
8.4.50.0100.01018.80
8.4.40.0070.00317.99
8.4.30.0160.00318.85
8.4.20.0030.00619.70
8.4.10.0040.00419.62
8.3.280.0130.00818.37
8.3.270.0090.01016.84
8.3.260.0110.00816.49
8.3.250.0050.00218.80
8.3.240.0130.00617.35
8.3.230.0110.00716.76
8.3.220.0100.00819.19
8.3.210.0050.00216.73
8.3.200.0040.00516.84
8.3.190.0110.00716.89
8.3.180.0130.00717.19
8.3.170.0190.00020.56
8.3.160.0000.01816.60
8.3.150.0180.00017.28
8.3.140.0090.00916.57
8.3.130.0030.00618.71
8.3.120.0090.00620.91
8.3.110.0070.00420.94
8.3.100.0070.00320.00
8.3.90.0110.00416.70
8.3.80.0090.00018.43
8.3.70.0130.00616.75
8.3.60.0120.00616.75
8.3.50.0040.01223.73
8.3.40.0080.00818.71
8.3.30.0110.00318.67
8.3.20.0070.00020.73
8.3.10.0040.00420.22
8.3.00.0070.00020.76
8.2.290.0130.00520.59
8.2.280.0050.01218.31
8.2.270.0140.00417.25
8.2.260.0140.00416.66
8.2.250.0120.00618.36
8.2.240.0030.00618.95
8.2.230.0000.00922.58
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0090.00016.75
8.2.190.0070.01018.29
8.2.180.0070.00716.74
8.2.170.0110.00422.96
8.2.160.0160.00319.41
8.2.150.0000.00824.18
8.2.140.0150.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00322.25
8.2.100.0110.00017.79
8.2.90.0080.00618.84
8.2.80.0000.00818.71
8.2.70.0040.00417.63
8.2.60.0050.00318.04
8.2.50.0000.00818.07
8.2.40.0040.00419.82
8.2.30.0000.00719.30
8.2.20.0000.00717.93
8.2.10.0050.00319.11
8.2.00.0050.00319.20
8.1.330.0120.00721.89
8.1.320.0120.00616.37
8.1.310.0030.00517.89
8.1.300.0030.00618.51
8.1.290.0040.00418.88
8.1.280.0070.01125.92
8.1.270.0070.00022.09
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0040.00420.17
8.1.230.0040.00817.77
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.54
8.1.160.0040.00418.99
8.1.150.0070.00018.94
8.1.140.0000.00718.88
8.1.130.0040.00421.93
8.1.120.0000.00717.48
8.1.110.0090.00017.32
8.1.100.0000.00817.37
8.1.90.0070.00017.34
8.1.80.0030.00617.45
8.1.70.0040.00417.45
8.1.60.0030.00517.55
8.1.50.0100.00017.42
8.1.40.0030.00517.50
8.1.30.0060.00317.61
8.1.20.0080.00017.57
8.1.10.0050.00317.46
8.1.00.0050.00317.49
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0030.00318.36
8.0.270.0030.00518.11
8.0.260.0030.00320.05
8.0.250.0070.00016.92
8.0.240.0000.00816.91
8.0.230.0000.00716.90
8.0.220.0090.00016.74
8.0.210.0030.00316.84
8.0.200.0040.00416.92
8.0.190.0000.00716.85
8.0.180.0070.00016.84
8.0.170.0000.00916.89
8.0.160.0050.00216.89
8.0.150.0000.00716.88
8.0.140.0040.00416.91
8.0.130.0000.00513.39
8.0.120.0000.00816.93
8.0.110.0000.00716.93
8.0.100.0070.00016.97
8.0.90.0030.00616.88
8.0.80.0080.00816.85
8.0.70.0070.00016.89
8.0.60.0050.00316.84
8.0.50.0040.00416.82
8.0.30.0040.01216.98
8.0.20.0030.01617.06
8.0.10.0030.00516.95
8.0.00.0070.01016.80
7.4.330.0020.00215.55
7.4.320.0000.00616.41
7.4.300.0000.00716.43
7.4.290.0050.00516.39
7.4.280.0050.00316.63
7.4.270.0000.00716.64
7.4.260.0000.00613.25
7.4.250.0000.00716.41
7.4.240.0020.00516.60
7.4.230.0000.00716.25
7.4.220.0020.00516.66
7.4.210.0040.01116.55
7.4.200.0030.00316.60
7.4.130.0160.00716.59
7.4.120.0160.00616.57
7.4.110.0070.01016.35
7.4.100.0030.01316.61
7.4.90.0090.01216.52
7.4.80.0070.01119.39
7.4.70.0060.01016.54
7.4.60.0100.00716.37
7.4.50.0040.01516.27
7.4.40.0140.00316.41
7.4.30.0070.01216.59
7.4.20.0170.00416.27
7.4.10.0140.01016.53
7.4.00.0060.01216.48
7.3.330.0000.00716.41
7.3.320.0000.00513.43
7.3.310.0080.00016.28
7.3.300.0070.00016.29
7.3.290.0070.01016.37
7.3.280.0100.00316.43
7.3.260.0090.01216.49
7.3.240.0120.00516.58
7.3.230.0110.01116.53
7.3.210.0080.00816.70
7.3.200.0130.00316.55
7.3.190.0130.00316.55
7.3.180.0060.01016.36
7.3.170.0120.00616.51
7.3.160.0150.00316.64
7.3.150.0130.01016.30
7.3.140.0100.01016.30
7.3.130.0130.00716.44
7.3.120.0060.01316.50
7.3.110.0080.01216.36
7.3.100.0130.00516.56
7.3.90.0040.01716.44
7.3.80.0180.00616.26
7.3.70.0200.00516.43
7.3.60.0200.00416.30
7.3.50.0180.00316.29
7.3.40.0060.01416.43
7.3.30.0150.00416.39
7.3.20.0130.01016.44
7.3.10.0150.00516.29
7.3.00.0100.01016.33
7.2.330.0030.01516.47
7.2.320.0090.00916.78
7.2.310.0040.01216.86
7.2.300.0060.01516.46
7.2.290.0080.01116.76
7.2.280.0080.01516.80
7.2.270.0160.00416.77
7.2.260.0090.00916.58
7.2.250.0110.00716.56
7.2.240.0120.01216.74
7.2.230.0100.01016.69
7.2.220.0070.01716.35
7.2.210.0110.01416.49
7.2.200.0100.01416.54
7.2.190.0100.01716.58
7.2.180.0160.00816.63
7.2.170.0030.01616.66
7.2.160.0140.00816.53
7.2.150.0110.01416.71
7.2.140.0110.00816.76
7.2.130.0160.00616.61
7.2.120.0130.01016.64
7.2.110.0170.00516.67
7.2.100.0120.00916.55
7.2.90.0060.01216.69
7.2.80.0060.01316.65
7.2.70.0090.01216.61
7.2.60.0080.01316.55
7.2.50.0100.01016.71
7.2.40.0160.00416.72
7.2.30.0030.01716.66
7.2.20.0060.01516.67
7.2.10.0060.01416.68
7.2.00.0090.00916.67

preferences:
29.79 ms | 403 KiB | 5 Q