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 $e->getMessage(); } #unset($b); } } catch (Exception $e) { echo $e->getMessage(); } } catch (Exception $e) { echo $e->getMessage(); } ?>

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.0070.00718.43
8.3.50.0120.00522.00
8.3.40.0070.01018.83
8.3.30.0130.00619.27
8.3.20.0080.00020.34
8.3.10.0000.00823.65
8.3.00.0000.00819.26
8.2.180.0070.01418.36
8.2.170.0200.00022.96
8.2.160.0120.00620.47
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0000.00822.29
8.2.110.0030.00622.08
8.2.100.0060.00617.84
8.2.90.0060.00319.05
8.2.80.0040.00417.97
8.2.70.0040.00717.63
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0040.00419.95
8.2.30.0040.00419.79
8.2.20.0030.00517.76
8.2.10.0030.00618.18
8.2.00.0070.00317.76
8.1.280.0070.00725.92
8.1.270.0050.00323.97
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00423.61
8.1.230.0040.00719.16
8.1.220.0030.00617.79
8.1.210.0030.00518.77
8.1.200.0040.00417.36
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0050.00318.46
8.1.160.0040.00422.15
8.1.150.0080.00018.50
8.1.140.0020.00517.34
8.1.130.0030.00317.72
8.1.120.0000.00717.48
8.1.110.0070.00017.35
8.1.100.0040.00417.47
8.1.90.0040.00417.43
8.1.80.0000.00717.49
8.1.70.0070.00017.43
8.1.60.0040.00417.56
8.1.50.0030.00517.56
8.1.40.0000.00717.50
8.1.30.0040.00417.55
8.1.20.0030.00517.70
8.1.10.0060.00317.59
8.1.00.0080.00017.57
8.0.300.0040.00418.77
8.0.290.0030.00317.18
8.0.280.0040.00418.46
8.0.270.0070.00017.21
8.0.260.0070.00017.26
8.0.250.0030.00317.00
8.0.240.0030.00316.91
8.0.230.0030.00316.82
8.0.220.0040.00416.89
8.0.210.0000.00716.91
8.0.200.0030.00316.92
8.0.190.0030.00616.97
8.0.180.0030.00416.88
8.0.170.0040.00416.90
8.0.160.0050.00216.79
8.0.150.0070.00016.82
8.0.140.0040.00416.89
8.0.130.0000.00613.43
8.0.120.0030.00616.93
8.0.110.0040.00416.93
8.0.100.0000.00916.92
8.0.90.0070.00016.94
8.0.80.0000.01517.03
8.0.70.0080.00016.95
8.0.60.0000.00716.88
8.0.50.0040.00416.76
8.0.30.0090.01117.12
8.0.20.0120.00817.40
8.0.10.0060.00316.89
8.0.00.0120.00716.86
7.4.330.0030.00315.14
7.4.320.0000.00716.51
7.4.300.0000.00616.48
7.4.290.0000.00716.49
7.4.280.0040.00416.60
7.4.270.0000.00716.52
7.4.260.0070.00016.49
7.4.250.0000.00716.44
7.4.240.0040.00316.58
7.4.230.0000.00716.68
7.4.220.0090.00916.52
7.4.210.0080.01016.59
7.4.200.0030.00316.71
7.4.190.0050.00216.57
7.4.160.0120.00616.63
7.4.150.0100.01017.40
7.4.140.0200.01117.86
7.4.130.0100.00716.65
7.4.120.0100.01016.65
7.4.110.0140.00316.49
7.4.100.0090.00916.59
7.4.90.0070.01016.79
7.4.80.0120.00919.39
7.4.70.0120.00416.65
7.4.60.0130.00316.50
7.4.50.0000.00916.55
7.4.40.0060.00922.77
7.4.30.0090.00616.30
7.4.00.0060.01214.77
7.3.330.0050.00013.36
7.3.320.0030.00313.37
7.3.310.0040.00416.21
7.3.300.0030.00316.28
7.3.290.0090.00616.37
7.3.280.0110.00516.36
7.3.270.0100.00717.40
7.3.260.0140.01116.35
7.3.250.0140.00416.51
7.3.240.0100.00716.39
7.3.230.0110.00516.41
7.3.210.0100.00616.49
7.3.200.0130.00619.39
7.3.190.0110.00516.65
7.3.180.0080.00816.47
7.3.170.0030.01316.27
7.3.160.0030.01216.45
7.3.120.0030.01214.78
7.2.330.0160.00816.82
7.2.320.0120.00816.71
7.2.310.0060.01416.34
7.2.300.0080.00816.70
7.2.290.0100.01116.73
7.2.60.0090.00616.97
7.2.00.0030.00919.21
7.1.200.0070.00315.60
7.1.70.0030.00617.26
7.1.60.0070.00317.28
7.1.50.0080.00817.00
7.1.00.0030.07722.27
7.0.200.0060.00616.63
7.0.140.0000.07722.08
7.0.60.0100.07019.98
7.0.50.0030.04017.97
7.0.40.0130.08319.96
7.0.30.0400.04720.10
7.0.20.0470.05020.09
7.0.10.0030.09020.21
7.0.00.0100.06020.23
5.6.280.0000.07720.83
5.6.210.0000.06320.55
5.6.200.0170.07318.16
5.6.190.0130.07020.50
5.6.180.0330.07020.45
5.6.170.0330.07020.50
5.6.160.0030.04020.51
5.6.150.0070.03718.15
5.6.140.0070.03718.11
5.6.130.0070.08018.24
5.6.120.0070.08721.01
5.6.110.0030.08321.10
5.6.100.0100.06021.00
5.6.90.0100.06320.98
5.6.80.0070.03720.38
5.6.70.3730.03020.41
5.5.350.0170.09320.45
5.5.340.0100.07718.09
5.5.330.0100.03720.39
5.5.320.0200.03720.42
5.5.310.0300.07020.32
5.5.300.0030.07318.04
5.5.290.0100.07318.04
5.5.280.0130.08020.98
5.5.270.0100.08020.88
5.5.260.0100.08020.88
5.5.250.0030.08320.62
5.5.240.0100.07320.09
5.4.450.0170.05719.41
5.4.440.0030.07019.42
5.4.430.0100.05719.12
5.4.420.0200.05019.52
5.4.410.0130.05719.29
5.4.400.0070.05719.00
5.4.390.0130.05319.10
5.4.380.0300.04718.74
5.4.370.0400.05318.54
5.4.360.0300.04718.60
5.4.350.0330.05018.76
5.4.340.0270.06018.79
5.4.320.0050.03612.52
5.4.310.0050.03812.51
5.4.300.0060.03812.51
5.4.290.0070.03912.49
5.4.280.0090.04112.39
5.4.270.0080.03912.39
5.4.260.0070.04412.39
5.4.250.0110.05712.39
5.4.240.0140.06712.39
5.4.230.0160.06312.38
5.4.220.0120.06112.38
5.4.210.0120.04812.38
5.4.200.0150.05712.38
5.4.190.0070.05912.38
5.4.180.0170.09412.38
5.4.170.0100.05312.38
5.4.160.0150.05312.38
5.4.150.0140.09112.38
5.4.140.0130.04712.06
5.4.130.0130.04112.05
5.4.120.0090.06012.01
5.4.110.0070.05412.00
5.4.100.0100.04112.00
5.4.90.0080.04312.00
5.4.80.0140.04812.01
5.4.70.0060.04012.00
5.4.60.0100.03412.00
5.4.50.0120.06512.00
5.4.40.0080.04411.99
5.4.30.0100.04311.99
5.4.20.0090.04311.99
5.4.10.0140.04311.98
5.4.00.0110.05511.47
5.3.290.0050.04412.80
5.3.280.0090.04812.71
5.3.270.0100.04212.72
5.3.260.0130.04712.72
5.3.250.0110.07212.72
5.3.240.0100.07012.72
5.3.230.0100.05612.71
5.3.220.0130.06812.68
5.3.210.0400.18112.68
5.3.200.0140.06312.68
5.3.190.0100.04912.68
5.3.180.0030.04112.67
5.3.170.0040.03912.67
5.3.160.0060.04112.68
5.3.150.0130.03512.68
5.3.140.0110.05112.66
5.3.130.0100.05112.65
5.3.120.0070.05312.66
5.3.110.0080.04812.66
5.3.100.0070.03912.13
5.3.90.0110.04312.11
5.3.80.0110.03712.10
5.3.70.0040.04112.10
5.3.60.0060.03912.09
5.3.50.0030.04712.04
5.3.40.0120.05912.04
5.3.30.0130.08712.00
5.3.20.0140.05311.78
5.3.10.0090.04311.74
5.3.00.0120.05311.73
5.2.170.0080.0429.23
5.2.160.0070.0359.23
5.2.150.0060.0329.23
5.2.140.0070.0479.23
5.2.130.0100.0369.19
5.2.120.0040.0339.19
5.2.110.0060.0479.20
5.2.100.0160.0559.20
5.2.90.0050.0309.19
5.2.80.0050.0319.18
5.2.70.0080.0419.18
5.2.60.0050.0429.14
5.2.50.0080.0429.11
5.2.40.0040.0389.08
5.2.30.0100.0399.05
5.2.20.0060.0419.05
5.2.10.0070.0458.95
5.2.00.0100.0418.82
5.1.60.0090.0628.10
5.1.50.0110.0538.10
5.1.40.0040.0288.08
5.1.30.0080.0258.43
5.1.20.0030.0298.45
5.1.10.0060.0358.17
5.1.00.0070.0268.17
5.0.50.0060.0236.66
5.0.40.0070.0256.52
5.0.30.0050.0426.33
5.0.20.0070.0286.29
5.0.10.0060.0266.27
5.0.00.0090.0376.27
4.4.90.0020.0254.78
4.4.80.0050.0224.76
4.4.70.0030.0224.76
4.4.60.0010.0244.75
4.4.50.0030.0234.77
4.4.40.0040.0334.71
4.4.30.0010.0244.76
4.4.20.0060.0214.84
4.4.10.0050.0274.85
4.4.00.0080.0344.76
4.3.110.0050.0154.67
4.3.100.0030.0154.67
4.3.90.0040.0174.63
4.3.80.0030.0264.58
4.3.70.0060.0404.63
4.3.60.0060.0284.63
4.3.50.0040.0214.63
4.3.40.0030.0284.54
4.3.30.0020.0173.30
4.3.20.0030.0163.28
4.3.10.0020.0173.23
4.3.00.0130.03710.55

preferences:
39.46 ms | 401 KiB | 5 Q