3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cls { public static function meth(int $a, string $b) : void { throw new Exception; } public function meth2(int $a, string $b): void { throw new Exception; } } try { cls::meth(1,'hello'); }catch (\Throwable $t) { var_export($t->getTrace()); echo "\n"; } try { (new cls)->meth2(1,'hello'); }catch (\Throwable $t) { var_export($t->getTrace()); echo "\n"; } function func() { throw new Exception; } try { func(); }catch (\Throwable $t) { var_export($t->getTrace()); echo "\n"; } try{ (function() { throw new Exception;})(); } catch (\Throwable $t) { var_export($t->getTrace()); echo "\n"; } try { throw new Exception; } catch (\Throwable $t) { var_export($t->getTrace()); echo "\n"; }

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.10.0060.00320.46
8.3.140.0120.00617.17
8.3.130.0090.00316.71
8.3.120.0070.01119.11
8.3.110.0060.00316.63
8.3.100.0040.01116.50
8.3.90.0040.01426.77
8.3.80.0060.00316.63
8.3.70.0210.00016.63
8.3.60.0210.00018.52
8.3.50.0110.00419.92
8.3.40.0060.01219.14
8.3.30.0100.00719.29
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.260.0040.00416.81
8.2.250.0000.00816.87
8.2.240.0040.01217.33
8.2.230.0030.00620.94
8.2.220.0040.00437.54
8.2.210.0070.01126.77
8.2.200.0040.00416.88
8.2.190.0000.01516.58
8.2.180.0110.00325.92
8.2.170.0070.01018.96
8.2.160.0030.01422.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0090.00026.16
8.2.110.0040.00419.39
8.2.100.0030.00917.72
8.2.90.0080.00019.05
8.2.80.0000.00817.97
8.2.70.0030.00617.48
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0060.00318.22
8.2.30.0040.00418.10
8.2.20.0080.00020.55
8.2.10.0040.00418.15
8.2.00.0040.00419.25
8.1.310.0090.00917.82
8.1.300.0000.00818.50
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0050.00223.99
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00623.92
8.1.230.0080.00322.31
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0090.00018.64
8.1.160.0040.00418.93
8.1.150.0040.00418.58
8.1.140.0060.00317.41
8.1.130.0030.00318.96
8.1.120.0040.00417.37
8.1.110.0000.00817.50
8.1.100.0000.00717.38
8.1.90.0080.00017.50
8.1.80.0000.00717.52
8.1.70.0000.00717.48
8.1.60.0050.00317.58
8.1.50.0050.00317.54
8.1.40.0070.00017.58
8.1.30.0260.00217.68
8.1.20.0190.00617.68
8.1.10.0180.00717.51
8.1.00.0170.00817.44
8.0.300.0000.00818.84
8.0.290.0050.00216.75
8.0.280.0030.00620.23
8.0.270.0050.00318.10
8.0.260.0050.00218.40
8.0.250.0040.00417.00
8.0.240.0030.00316.95
8.0.230.0000.00716.87
8.0.220.0000.00716.82
8.0.210.0080.00016.92
8.0.200.0000.00717.00
8.0.190.0070.00317.04
8.0.180.0040.00417.08
8.0.170.0100.01116.98
8.0.160.0100.01016.94
8.0.150.0160.00416.92
8.0.140.0120.00916.93
8.0.130.0170.00516.93
8.0.120.0200.00416.85
8.0.110.0220.00016.80
8.0.100.0200.00017.00
8.0.90.0120.00916.99
8.0.80.0180.00417.00
8.0.70.0160.00616.84
8.0.60.0120.00816.91
8.0.50.0130.00616.85
8.0.30.0120.00816.94
8.0.20.0160.00717.00
8.0.10.0180.00516.95
7.4.330.0020.00215.55
7.4.320.0000.00616.44
7.4.300.0000.00616.54
7.4.290.0000.01016.60
7.4.280.0230.00516.43
7.4.270.0280.00316.59
7.4.260.0160.01216.54
7.4.250.0190.00816.56
7.4.240.0210.00616.50
7.4.230.0240.00416.64
7.4.220.0190.00416.45
7.4.210.0160.00516.50
7.4.200.0150.01116.59
7.4.190.0190.00616.58
7.4.180.0130.01016.64
7.4.160.0180.00616.58
7.4.150.0150.00816.48
7.4.140.0160.00616.41
7.4.130.0220.00216.46
7.4.120.0040.00916.39
7.4.110.0170.00316.46
7.4.100.0160.00016.54
7.4.90.0160.00616.49
7.4.80.0210.00416.55
7.4.70.0220.00016.35
7.4.60.0180.00616.42
7.4.50.0120.00016.34
7.4.40.0040.00716.38
7.4.30.0030.00616.54
7.4.20.0000.00916.40
7.4.10.0070.00416.53
7.4.00.0030.00616.37

preferences:
17.77 ms | 403 KiB | 5 Q