3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Z { public function __destruct() { throw new Exception('destruct Z'); } } class A { private $m; public function __construct() { #$this->m = new Z(); } public function __destruct() { throw new Exception('destruct A'); } } class B { public function abc() { $a = new A(); } public function __destruct() { throw new Exception('destruct B'); } } try { try { { $b = new B(); try { $b->abc(); } catch (Exception $e) { echo '1: ' . $e->getMessage() . "\n"; } unset($b); } } catch (Exception $e) { echo '2: ' . $e->getMessage() . "\n"; } } catch (Exception $e) { echo '3: ' . $e->getMessage() . "\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.3.60.0100.00716.50
8.3.50.0120.00722.09
8.3.40.0170.00318.97
8.3.30.0170.00019.04
8.3.20.0050.00320.31
8.3.10.0070.00023.61
8.3.00.0040.00419.50
8.2.180.0090.00618.25
8.2.170.0060.00922.96
8.2.160.0040.01520.39
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00822.25
8.2.110.0060.00321.89
8.2.100.0040.00717.84
8.2.90.0060.00618.87
8.2.80.0050.00317.97
8.2.70.0000.01117.48
8.2.60.0050.00319.65
8.2.50.0080.00018.07
8.2.40.0040.00419.88
8.2.30.0000.00819.75
8.2.20.0000.00817.63
8.2.10.0000.00717.94
8.2.00.0060.00617.81
8.1.280.0130.00325.92
8.1.270.0030.00523.84
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0060.00323.84
8.1.230.0040.00719.10
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0090.00017.36
8.1.190.0050.00317.38
8.1.180.0060.00318.10
8.1.170.0000.00818.59
8.1.160.0040.00422.01
8.1.150.0030.00618.64
8.1.140.0000.00717.46
8.1.130.0030.00317.82
8.1.120.0000.00717.36
8.1.110.0050.00317.41
8.1.100.0070.00017.37
8.1.90.0040.00417.45
8.1.80.0040.00417.35
8.1.70.0000.00717.35
8.1.60.0030.00617.55
8.1.50.0000.00817.39
8.1.40.0080.00017.50
8.1.30.0000.00817.46
8.1.20.0030.00617.48
8.1.10.0000.00717.59
8.1.00.0050.00317.42
8.0.300.0070.00018.77
8.0.290.0000.00817.24
8.0.280.0080.00018.32
8.0.270.0070.00017.29
8.0.260.0030.00317.20
8.0.250.0040.00416.93
8.0.240.0070.00017.04
8.0.230.0040.00416.92
8.0.220.0030.00316.93
8.0.210.0000.00716.95
8.0.200.0000.00617.04
8.0.190.0030.00616.98
8.0.180.0040.00416.98
8.0.170.0080.00016.86
8.0.160.0030.00316.83
8.0.150.0040.00416.79
8.0.140.0070.00016.91
8.0.130.0000.00613.41
8.0.120.0050.00316.95
8.0.110.0050.00216.77
8.0.100.0040.00416.76
8.0.90.0050.00316.81
8.0.80.0130.00316.90
8.0.70.0000.00716.80
8.0.60.0000.00716.92
8.0.50.0000.00716.90
8.0.30.0120.01017.05
8.0.20.0140.00617.40
8.0.10.0080.00017.01
8.0.00.0130.00516.72
7.4.330.0000.00515.01
7.4.320.0000.00616.52
7.4.300.0000.00616.55
7.4.290.0000.00616.46
7.4.280.0000.00716.62
7.4.270.0040.00416.57
7.4.260.0030.00316.54
7.4.250.0040.00416.37
7.4.240.0020.00516.47
7.4.230.0070.00016.25
7.4.220.0060.01016.48
7.4.210.0060.01016.59
7.4.200.0040.00416.55
7.4.190.0030.00316.69
7.4.160.0080.01516.55
7.4.150.0060.01217.40
7.4.140.0100.01017.86
7.4.130.0080.01016.48
7.4.120.0020.01416.61
7.4.110.0070.01116.42
7.4.100.0150.00316.38
7.4.90.0110.00616.59
7.4.80.0120.00619.39
7.4.70.0060.00916.68
7.4.60.0120.00616.50
7.4.50.0000.00816.34
7.4.40.0070.00722.77
7.4.30.0060.01016.58
7.4.00.0070.00715.01
7.3.330.0030.00313.33
7.3.320.0030.00313.35
7.3.310.0070.00016.27
7.3.300.0000.00716.18
7.3.290.0100.01216.27
7.3.280.0100.00616.36
7.3.270.0230.00017.40
7.3.260.0040.01516.44
7.3.250.0130.00816.50
7.3.240.0060.00916.49
7.3.230.0090.00616.53
7.3.210.0100.01016.47
7.3.200.0100.00919.39
7.3.190.0040.01516.32
7.3.180.0100.00616.35
7.3.170.0140.03216.42
7.3.160.0040.01516.64
7.3.120.0080.00914.91
7.3.10.0030.01016.62
7.3.00.0100.00316.33
7.2.330.0100.01316.62
7.2.320.0170.00716.33
7.2.310.0130.00716.74
7.2.300.0060.00916.62
7.2.290.0030.01516.45
7.2.130.0000.01416.75
7.2.120.0100.00616.36
7.2.110.0060.01016.38
7.2.100.0060.00316.77
7.2.90.0070.00716.82
7.2.80.0000.01116.91
7.2.70.0040.01116.76
7.2.60.0070.00716.77
7.2.50.0130.00316.71
7.2.40.0130.00316.55
7.2.30.0060.00917.09
7.2.20.0070.00316.91
7.2.10.0040.00816.73
7.2.00.0140.00818.16
7.1.250.0080.00415.76
7.1.100.0080.00818.29
7.1.70.0070.01017.20
7.1.60.0090.01519.46
7.1.50.0060.00616.84
7.1.00.0070.07022.33
7.0.200.0230.00314.61
7.0.140.0070.06322.19
7.0.110.0130.07319.93
7.0.100.0100.08019.97
7.0.90.0070.08319.83
7.0.80.0070.05020.05
7.0.70.0000.05320.00
7.0.60.0170.07020.00
7.0.50.0030.08320.50
7.0.40.0000.08320.26
7.0.30.0100.05020.17
7.0.20.0070.08720.27
7.0.10.0070.07720.14
7.0.00.0070.08320.04
5.6.280.0100.06721.11
5.6.260.0030.05020.66
5.6.250.0070.07720.65
5.6.240.0130.07720.52
5.6.230.0100.08320.53
5.6.220.0070.08720.62
5.6.210.0100.08020.64
5.6.200.0070.06020.96
5.6.190.0000.09021.06
5.6.180.0100.08021.01
5.6.170.0200.04021.00
5.6.160.0170.07321.04
5.6.150.0130.07721.16
5.6.140.0130.07721.10
5.6.130.0100.06721.06
5.6.120.0100.08321.15
5.6.110.0030.05721.12
5.6.100.0000.09020.94
5.6.90.0130.07021.11
5.6.80.0170.07020.53
5.6.70.0130.07020.65
5.6.60.0070.08020.46
5.6.50.0100.06020.53
5.6.40.0070.08020.48
5.6.30.0130.04020.52
5.6.20.0070.07720.65
5.6.10.0070.08320.51
5.6.00.0070.05720.49
5.5.380.0030.08320.25
5.5.370.0100.07720.32
5.5.360.0100.07720.42
5.5.350.0170.07320.33
5.5.340.0030.08721.04
5.5.330.0070.08320.91
5.5.320.0070.08020.96
5.5.310.0200.06320.79
5.5.300.0100.07320.92
5.5.290.0100.07020.96
5.5.280.0030.08720.79
5.5.270.0070.08320.88
5.5.260.0100.08021.02
5.5.250.0070.09020.81
5.5.240.0030.08020.29
5.5.230.0070.07320.13
5.5.220.0070.05020.20
5.5.210.0000.08720.26
5.5.200.0070.07720.23
5.5.190.0030.05320.20
5.5.180.0030.08720.17
5.5.160.0130.06720.31
5.5.150.0070.06720.14
5.5.140.0130.07020.38
5.5.130.0030.07320.34
5.5.120.0100.07720.33
5.5.110.0070.08020.25
5.5.100.0170.07020.25
5.5.90.0030.07720.20
5.5.80.0070.05720.26
5.5.70.0170.06720.25
5.5.60.0130.07020.00
5.5.50.0100.07320.26
5.5.40.0030.08720.25
5.5.30.0130.06020.07
5.5.20.0000.08320.14
5.5.10.0130.08020.15
5.5.00.0030.08719.96
5.4.450.0070.08019.67
5.4.440.0170.07319.64
5.4.430.0100.07019.45
5.4.420.0070.08719.64
5.4.410.0030.08019.27
5.4.400.0130.06018.99
5.4.390.0070.04018.94
5.4.380.0000.08019.23
5.4.370.0070.08318.98
5.4.360.0130.07319.02
5.4.350.0070.04019.23
5.4.340.0100.07319.01
5.4.320.0030.08018.97
5.4.310.0070.08019.25
5.4.300.0030.08319.01
5.4.290.0170.07019.12
5.4.280.0030.05319.02
5.4.270.0100.07319.02
5.4.260.0200.05718.99
5.4.250.0030.04718.89
5.4.240.0070.06719.04
5.4.230.0170.06719.07
5.4.220.0000.09019.01
5.4.210.0170.06019.15
5.4.200.0100.07319.01
5.4.190.0070.07719.17
5.4.180.0070.04718.89
5.4.170.0070.08319.06
5.4.160.0000.04319.20
5.4.150.0100.04718.97
5.4.140.0070.07716.60
5.4.130.0070.07016.55
5.4.120.0070.07016.39
5.4.110.0100.07316.45
5.4.100.0000.07316.41
5.4.90.0070.06016.45
5.4.80.0030.07316.34
5.4.70.0100.06316.32
5.4.60.0030.08016.40
5.4.50.0100.03716.53
5.4.40.0070.07316.57
5.4.30.0070.04316.53
5.4.20.0030.07716.43
5.4.10.0200.05316.46
5.4.00.0100.06015.90
5.3.290.0070.07714.70
5.3.280.0100.07314.75
5.3.270.0070.06014.47
5.3.260.0070.06314.75
5.3.250.0100.07714.75
5.3.240.0200.06014.65
5.3.230.0100.06314.58
5.3.220.0070.03714.58
5.3.210.0070.07714.57
5.3.200.0130.06714.57
5.3.190.0100.07314.43
5.3.180.0070.04714.66
5.3.170.0000.08314.60
5.3.160.0130.03714.70
5.3.150.0070.07014.71
5.3.140.0100.05314.57
5.3.130.0200.06314.56
5.3.120.0000.06714.57
5.3.110.0130.06714.66
5.3.100.0070.07714.05
5.3.90.0070.06714.05
5.3.80.0130.06314.00
5.3.70.0030.04014.04
5.3.60.0070.04014.10
5.3.50.0030.05313.97
5.3.40.0000.04013.96
5.3.30.0100.03013.94
5.3.20.0030.03713.69
5.3.10.0070.04313.89
5.3.00.0070.03713.77
5.2.170.0070.02711.74
5.2.160.0000.03311.74
5.2.150.0000.03311.74
5.2.140.0030.04011.74
5.2.130.0030.02711.74
5.2.120.0070.02311.74
5.2.110.0030.03011.74
5.2.100.0000.03011.74
5.2.90.0070.02311.74
5.2.80.0000.03711.74
5.2.70.0000.03011.74
5.2.60.0030.04311.74
5.2.50.0030.05011.74
5.2.40.0070.02311.74
5.2.30.0130.03311.74
5.2.20.0070.04711.74
5.2.10.0070.03311.74
5.2.00.0000.04311.74
5.1.60.0000.05711.74
5.1.50.0030.02711.74
5.1.40.0000.02711.74
5.1.30.0000.02711.74
5.1.20.0030.03711.74
5.1.10.0000.02711.74
5.1.00.0030.04011.74
5.0.50.0000.02011.74
5.0.40.0030.04011.74
5.0.30.0000.03311.74
5.0.20.0030.01711.74
5.0.10.0000.02711.74
5.0.00.0000.03011.74
4.4.90.0070.02711.74
4.4.80.0030.01711.74
4.4.70.0000.02011.74
4.4.60.0000.01711.74
4.4.50.0000.02711.74
4.4.40.0000.02711.74
4.4.30.0030.01311.74
4.4.20.0030.01311.74
4.4.10.0000.01711.74
4.4.00.0000.02311.74
4.3.110.0000.01311.74
4.3.100.0000.02011.74
4.3.90.0030.01311.74
4.3.80.0000.02311.74
4.3.70.0000.01311.74
4.3.60.0070.01711.74
4.3.50.0000.01711.74
4.3.40.0000.04711.74
4.3.30.0000.01711.74
4.3.20.0000.02711.74
4.3.10.0070.01711.74
4.3.00.0030.01311.74

preferences:
40.09 ms | 401 KiB | 5 Q