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.40.0110.00719.02
8.3.30.0150.00318.81
8.3.20.0000.00720.21
8.3.10.0030.00623.48
8.3.00.0050.00319.38
8.2.170.0150.00622.96
8.2.160.0100.00320.43
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0030.01026.16
8.2.120.0070.00022.27
8.2.110.0060.00322.20
8.2.100.0070.00417.59
8.2.90.0000.00819.27
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0040.00419.65
8.2.50.0030.00518.07
8.2.40.0030.00619.94
8.2.30.0030.00519.80
8.2.20.0040.00417.66
8.2.10.0040.00419.90
8.2.00.0020.01017.60
8.1.270.0060.00323.82
8.1.260.0080.00026.35
8.1.250.0100.00328.09
8.1.240.0100.00023.79
8.1.230.0040.00719.06
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0040.00417.25
8.1.190.0000.00817.25
8.1.180.0030.00618.10
8.1.170.0030.00618.71
8.1.160.0040.00422.09
8.1.150.0120.00018.62
8.1.140.0070.00017.49
8.1.130.0030.00317.75
8.1.120.0040.00417.46
8.1.110.0070.00017.51
8.1.100.0030.00417.45
8.1.90.0030.00517.30
8.1.80.0040.00417.46
8.1.70.0030.00317.39
8.1.60.0040.00417.60
8.1.50.0000.00817.54
8.1.40.0000.00917.49
8.1.30.0030.00517.52
8.1.20.0040.00417.61
8.1.10.0000.00817.57
8.1.00.0040.00417.52
8.0.300.0070.00018.99
8.0.290.0000.00817.18
8.0.280.0000.00718.49
8.0.270.0030.00317.35
8.0.260.0060.00017.26
8.0.250.0030.00317.06
8.0.240.0000.00716.91
8.0.230.0000.00716.99
8.0.220.0040.00417.02
8.0.210.0040.00416.97
8.0.200.0030.00317.00
8.0.190.0030.00516.91
8.0.180.0050.00316.97
8.0.170.0040.00417.03
8.0.160.0070.00016.79
8.0.150.0030.00416.98
8.0.140.0000.00816.79
8.0.130.0000.00513.32
8.0.120.0050.00316.90
8.0.110.0070.00016.93
8.0.100.0040.00416.75
8.0.90.0030.00516.99
8.0.80.0120.00316.95
8.0.70.0000.00716.98
8.0.60.0050.00216.77
8.0.50.0070.00017.01
8.0.30.0100.00916.96
8.0.20.0090.00917.40
8.0.10.0000.00817.02
8.0.00.0100.00916.84
7.4.330.0050.00015.00
7.4.320.0060.00016.61
7.4.300.0000.00616.64
7.4.290.0070.00016.52
7.4.280.0040.00416.60
7.4.270.0030.00316.49
7.4.260.0030.00316.48
7.4.250.0030.00516.45
7.4.240.0040.00416.59
7.4.230.0000.00716.60
7.4.220.0100.00716.67
7.4.210.0110.00616.59
7.4.200.0040.00416.64
7.4.190.0040.00416.57
7.4.160.0140.01116.49
7.4.150.0120.00617.40
7.4.140.0060.01317.86
7.4.130.0100.00616.51
7.4.120.0130.00516.54
7.4.110.0130.01016.69
7.4.100.0060.01316.55
7.4.90.0100.00716.36
7.4.80.0060.01319.39
7.4.70.0080.00816.63
7.4.60.0060.01616.46
7.4.50.0000.00816.49
7.4.40.0060.00922.77
7.4.30.0120.00416.64
7.4.00.0070.01014.85
7.3.330.0000.00513.38
7.3.320.0060.00013.17
7.3.310.0000.00716.22
7.3.300.0030.00316.39
7.3.290.0090.00616.47
7.3.280.0120.00516.37
7.3.270.0130.00617.40
7.3.260.0180.00316.41
7.3.250.0060.01116.50
7.3.240.0100.00616.45
7.3.230.0090.00616.40
7.3.210.0050.01116.40
7.3.200.0070.01119.39
7.3.190.0140.00316.42
7.3.180.0070.01016.27
7.3.170.0170.00016.51
7.3.160.0090.00616.36
7.3.120.0050.01214.91
7.3.110.0090.00914.80
7.3.100.0070.00714.97
7.3.90.0090.00914.75
7.3.80.0100.00714.64
7.3.70.0060.01214.73
7.3.60.0060.01014.73
7.3.50.0120.00314.64
7.3.40.0050.00514.75
7.3.30.0080.00614.64
7.3.20.0040.01116.77
7.3.10.0040.00716.32
7.3.00.0090.00316.42
7.2.330.0110.01116.62
7.2.320.0070.01016.88
7.2.310.0160.00616.55
7.2.300.0140.00316.43
7.2.290.0080.00816.50
7.2.250.0110.00715.31
7.2.240.0070.01114.80
7.2.230.0100.01015.25
7.2.220.0070.00715.26
7.2.210.0030.01314.77
7.2.200.0060.00614.80
7.2.190.0040.01215.08
7.2.180.0040.01114.85
7.2.170.0070.00714.64
7.2.60.0030.01016.94
7.2.50.0060.00616.82
7.2.00.0030.01319.13
7.1.330.0090.00615.69
7.1.320.0090.00615.63
7.1.310.0100.00715.50
7.1.300.0030.01015.44
7.1.290.0000.01515.63
7.1.280.0040.00815.65
7.1.270.0040.01115.72
7.1.260.0000.00815.75
7.1.200.0080.00815.66
7.1.100.0040.00718.11
7.1.70.0000.00717.16
7.1.60.0110.01419.46
7.1.50.0040.01816.81
7.1.00.0100.07322.35
7.0.200.0190.01014.57
7.0.140.0070.07022.05
7.0.60.0130.06320.05
7.0.50.0000.08717.99
7.0.40.0130.06719.96
7.0.30.0400.07020.31
7.0.20.0400.07020.19
7.0.10.0130.08020.24
7.0.00.0000.04320.05
5.6.280.0030.07321.11
5.6.210.0100.07020.53
5.6.200.0030.06318.29
5.6.190.0030.06020.48
5.6.180.0370.07020.57
5.6.170.0430.08320.46
5.6.160.0030.05720.52
5.6.150.0030.08018.15
5.6.140.0100.07718.25
5.6.130.0100.03718.18
5.6.120.0030.07721.03
5.6.110.0030.04321.01
5.6.100.0130.07320.86
5.6.90.0070.09021.08
5.6.80.0170.07020.45
5.5.350.0230.07320.39
5.5.340.0030.05717.99
5.5.330.0070.06720.40
5.5.320.0230.04020.32
5.5.310.0400.06320.27
5.5.300.0000.04318.05
5.5.290.0070.05317.97
5.5.280.0170.06020.86
5.5.270.0170.07020.89
5.5.260.0030.08020.80
5.5.250.0100.07720.70
5.5.240.0000.08020.17
5.4.450.0870.04019.37
5.4.440.0600.03319.40
5.4.430.0700.04719.34
5.4.420.0370.04319.36
5.4.410.0300.05319.27
5.4.400.0400.02719.11
5.4.390.0600.04719.04
5.4.380.0370.05318.73
5.4.370.0500.04318.59
5.4.360.0270.05718.73
5.4.350.0470.07018.57
5.4.340.0330.05018.66
5.4.320.0060.03712.51
5.4.310.0060.04312.51
5.4.300.0050.04012.51
5.4.290.0070.06612.49
5.4.280.0120.05312.39
5.4.270.0100.04812.39
5.4.260.0080.04012.39
5.4.250.0060.04012.39
5.4.240.0080.03612.38
5.4.230.0070.03812.38
5.4.220.0080.03612.38
5.4.210.0130.03212.38
5.4.200.0100.03512.38
5.4.190.0060.03612.38
5.4.180.0100.03212.37
5.4.170.0080.03412.39
5.4.160.0040.04112.38
5.4.150.0080.05012.38
5.4.140.0090.05112.06
5.4.130.0080.04712.05
5.4.120.0080.05012.01
5.4.110.0060.05012.01
5.4.100.0070.03512.01
5.4.90.0080.05212.00
5.4.80.0070.04312.00
5.4.70.0080.03212.00
5.4.60.0030.03712.00
5.4.50.0050.03612.00
5.4.40.0040.03611.99
5.4.30.0060.04011.98
5.4.20.0100.04811.98
5.4.10.0080.04911.99
5.4.00.0030.05411.47
5.3.290.0060.04312.80
5.3.280.0040.05512.71
5.3.270.0120.06012.72
5.3.260.0110.05312.72
5.3.250.0090.04612.72
5.3.240.0070.05712.72
5.3.230.0130.05512.71
5.3.220.0060.03812.68
5.3.210.0040.04612.68
5.3.200.0040.03912.68
5.3.190.0070.03712.68
5.3.180.0100.03212.67
5.3.170.0090.04012.67
5.3.160.0090.03312.67
5.3.150.0100.04012.68
5.3.140.0060.03612.66
5.3.130.0070.03912.66
5.3.120.0060.04612.66
5.3.110.0100.05212.65
5.3.100.0070.05112.13
5.3.90.0140.04412.11
5.3.80.0080.03812.10
5.3.70.0060.03912.10
5.3.60.0110.05112.09
5.3.50.0070.04012.04
5.3.40.0050.04012.04
5.3.30.0070.03712.00
5.3.20.0070.03711.78
5.3.10.0080.05211.74
5.3.00.0080.04311.72
5.2.170.0090.0329.23
5.2.160.0050.0379.23
5.2.150.0070.0449.23
5.2.140.0080.0399.23
5.2.130.0080.0329.19
5.2.120.0040.0429.19
5.2.110.0070.0369.19
5.2.100.0080.0389.20
5.2.90.0110.0359.20
5.2.80.0070.0299.19
5.2.70.0020.0339.19
5.2.60.0070.0299.14
5.2.50.0100.0299.11
5.2.40.0050.0389.08
5.2.30.0070.0289.07
5.2.20.0070.0279.05
5.2.10.0060.0278.96
5.2.00.0070.0328.82
5.1.60.0050.0248.10
5.1.50.0030.0278.10
5.1.40.0030.0268.09
5.1.30.0030.0288.43
5.1.20.0030.0288.46
5.1.10.0100.0218.18
5.1.00.0030.0278.17
5.0.50.0050.0206.66
5.0.40.0050.0186.51
5.0.30.0060.0306.33
5.0.20.0040.0206.30
5.0.10.0050.0196.27
5.0.00.0010.0336.26
4.4.90.0040.0154.78
4.4.80.0030.0154.76
4.4.70.0060.0134.75
4.4.60.0030.0164.76
4.4.50.0030.0164.77
4.4.40.0070.0224.71
4.4.30.0040.0154.76
4.4.20.0010.0184.85
4.4.10.0050.0134.85
4.4.00.0040.0254.76
4.3.110.0060.0134.67
4.3.100.0030.0154.66
4.3.90.0020.0164.63
4.3.80.0020.0264.58
4.3.70.0020.0164.63
4.3.60.0040.0144.63
4.3.50.0050.0144.63
4.3.40.0020.0254.54
4.3.30.0030.0153.30
4.3.20.0030.0153.28
4.3.10.0030.0153.23
4.3.00.0070.01313.17

preferences:
38.73 ms | 400 KiB | 5 Q