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.0110.00418.43
8.3.50.0100.00922.14
8.3.40.0090.00618.80
8.3.30.0100.00318.84
8.3.20.0040.00420.30
8.3.10.0040.00423.70
8.3.00.0080.00019.50
8.2.180.0070.01416.50
8.2.170.0150.00422.96
8.2.160.0130.01020.52
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0000.01026.16
8.2.120.0080.00022.12
8.2.110.0090.00022.09
8.2.100.0120.00017.84
8.2.90.0000.01019.21
8.2.80.0030.00517.97
8.2.70.0030.00717.75
8.2.60.0000.00819.66
8.2.50.0040.00418.07
8.2.40.0040.00419.94
8.2.30.0040.00419.73
8.2.20.0000.00817.77
8.2.10.0040.00418.07
8.2.00.0000.01117.63
8.1.280.0120.00325.92
8.1.270.0060.00323.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.96
8.1.230.0110.00018.97
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0080.00017.25
8.1.180.0030.00618.10
8.1.170.0030.00518.65
8.1.160.0000.00722.03
8.1.150.0030.00618.55
8.1.140.0040.00417.45
8.1.130.0000.00717.89
8.1.120.0000.00717.39
8.1.110.0000.00817.42
8.1.100.0070.00017.34
8.1.90.0000.00717.49
8.1.80.0030.00317.38
8.1.70.0030.00317.38
8.1.60.0030.00617.50
8.1.50.0050.00317.54
8.1.40.0000.00717.55
8.1.30.0040.00417.59
8.1.20.0060.00317.59
8.1.10.0070.00017.48
8.1.00.0050.00317.59
8.0.300.0050.00220.78
8.0.290.0000.00717.18
8.0.280.0000.00818.52
8.0.270.0000.00717.31
8.0.260.0030.00318.52
8.0.250.0000.00716.95
8.0.240.0000.00716.94
8.0.230.0070.00016.99
8.0.220.0000.00716.93
8.0.210.0000.00716.91
8.0.200.0000.00616.86
8.0.190.0000.00816.87
8.0.180.0040.00416.80
8.0.170.0000.00716.90
8.0.160.0030.00316.98
8.0.150.0030.00516.84
8.0.140.0040.00416.86
8.0.130.0030.00313.42
8.0.120.0000.00816.93
8.0.110.0090.00016.99
8.0.100.0050.00216.81
8.0.90.0070.00017.08
8.0.80.0040.01117.01
8.0.70.0040.00417.00
8.0.60.0000.00716.83
8.0.50.0040.00416.98
8.0.30.0060.01517.16
8.0.20.0080.01017.40
8.0.10.0000.00717.07
8.0.00.0130.00617.07
7.4.330.0000.00515.00
7.4.320.0000.00716.50
7.4.300.0000.00716.41
7.4.290.0000.00716.62
7.4.280.0040.00416.52
7.4.270.0040.00416.54
7.4.260.0000.00716.50
7.4.250.0070.00316.50
7.4.240.0060.00216.59
7.4.230.0000.00716.38
7.4.220.0030.01416.59
7.4.210.0080.00716.62
7.4.200.0040.00416.59
7.4.190.0040.00416.38
7.4.160.0030.01216.50
7.4.150.0060.01517.40
7.4.140.0110.00617.86
7.4.130.0120.00416.48
7.4.120.0110.00616.46
7.4.110.0100.00616.47
7.4.100.0040.01816.38
7.4.90.0120.00916.55
7.4.80.0110.01119.39
7.4.70.0040.01416.44
7.4.60.0100.00716.41
7.4.50.0060.00316.41
7.4.40.0030.01022.77
7.4.30.0080.00816.74
7.4.00.0030.00715.16
7.3.330.0000.00513.23
7.3.320.0000.00613.13
7.3.310.0030.00316.21
7.3.300.0030.00316.40
7.3.290.0200.00316.35
7.3.280.0070.01316.38
7.3.270.0110.00517.40
7.3.260.0080.00816.55
7.3.250.0120.00916.37
7.3.240.0060.00916.37
7.3.230.0040.01216.39
7.3.210.0100.00616.40
7.3.200.0140.00619.39
7.3.190.0040.01516.51
7.3.180.0100.00716.28
7.3.170.0100.02716.42
7.3.160.0100.00716.34
7.3.120.0060.01014.88
7.2.330.0100.01316.70
7.2.320.0030.01316.82
7.2.310.0090.00916.52
7.2.300.0030.01316.80
7.2.290.0070.01016.70
7.2.60.0050.00516.82
7.1.200.0040.00815.85
7.1.70.0050.00317.11
7.1.60.0130.01019.46
7.1.50.0000.01116.91
7.1.00.0000.08022.37
7.0.200.0670.00414.46
7.0.140.0030.07021.97
7.0.60.0030.09019.95
7.0.50.0030.07717.87
7.0.40.0030.04320.06
7.0.30.0500.07020.08
7.0.20.0200.04320.09
7.0.10.0030.05720.19
7.0.00.0000.08320.15
5.6.280.0000.07721.14
5.6.210.0170.07320.76
5.6.200.0070.06318.15
5.6.190.0130.05020.64
5.6.180.0170.03720.67
5.6.170.0270.07720.48
5.6.160.0100.03720.70
5.6.150.0000.09018.20
5.6.140.0130.07718.15
5.6.130.0100.07718.18
5.6.120.0070.03720.90
5.6.110.0030.06321.12
5.6.100.0000.06720.95
5.6.90.0070.07321.11
5.6.80.0130.06720.40
5.6.70.3600.04320.35
5.5.350.0100.05020.41
5.5.340.0000.08317.98
5.5.330.0100.06020.42
5.5.320.0270.04320.31
5.5.310.0330.06320.36
5.5.300.0030.05718.07
5.5.290.0000.09017.99
5.5.280.0070.04020.77
5.5.270.0030.04320.80
5.5.260.0030.08720.85
5.5.250.0070.08320.80
5.5.240.0230.06320.06
5.4.450.0100.06019.36
5.4.440.0100.05719.42
5.4.430.0130.05019.50
5.4.420.0130.05319.50
5.4.410.0170.05319.28
5.4.400.0100.05319.12
5.4.390.0200.04319.18
5.4.380.0470.06018.71
5.4.370.0300.05718.62
5.4.360.0330.05018.75
5.4.350.0300.05018.73
5.4.340.0400.05318.73
5.4.320.0080.04012.51
5.4.310.0070.04412.51
5.4.300.0050.03712.51
5.4.290.0140.03612.48
5.4.280.0070.03612.38
5.4.270.0120.03312.38
5.4.260.0060.04212.38
5.4.250.0120.04612.38
5.4.240.0090.04512.38
5.4.230.0110.04012.38
5.4.220.0080.04212.37
5.4.210.0060.03912.38
5.4.200.0050.03912.38
5.4.190.0050.03712.37
5.4.180.0040.03812.37
5.4.170.0080.03912.39
5.4.160.0120.04612.38
5.4.150.0060.05212.38
5.4.140.0130.05112.05
5.4.130.0100.04812.04
5.4.120.0070.06112.00
5.4.110.0080.04812.00
5.4.100.0080.04912.00
5.4.90.0100.05112.00
5.4.80.0090.07212.00
5.4.70.0100.04911.99
5.4.60.0120.04311.99
5.4.50.0060.05012.00
5.4.40.0060.04711.99
5.4.30.0070.03711.98
5.4.20.0060.03711.98
5.4.10.0040.03811.98
5.4.00.0070.03711.47
5.3.290.0110.04012.80
5.3.280.0100.04212.71
5.3.270.0050.04312.72
5.3.260.0050.04312.71
5.3.250.0060.04012.72
5.3.240.0040.04612.72
5.3.230.0100.03712.70
5.3.220.0080.03912.68
5.3.210.0080.04012.68
5.3.200.0050.04212.68
5.3.190.0080.04212.68
5.3.180.0070.05412.67
5.3.170.0070.05612.67
5.3.160.0070.05512.68
5.3.150.0060.03812.68
5.3.140.0050.03812.66
5.3.130.0080.04012.66
5.3.120.0050.04012.66
5.3.110.0080.05512.66
5.3.100.0070.04912.13
5.3.90.0080.04512.11
5.3.80.0090.04012.11
5.3.70.0080.04312.11
5.3.60.0070.04212.09
5.3.50.0110.03912.04
5.3.40.0080.03912.04
5.3.30.0090.03712.01
5.3.20.0110.05911.78
5.3.10.0070.05711.75
5.3.00.0100.07811.73
5.2.170.0120.0499.23
5.2.160.0100.0519.23
5.2.150.0150.0449.23
5.2.140.0070.0499.23
5.2.130.0070.0589.19
5.2.120.0070.0539.18
5.2.110.0060.0459.20
5.2.100.0140.0559.19
5.2.90.0080.0419.19
5.2.80.0120.0409.18
5.2.70.0120.0469.19
5.2.60.0070.0519.14
5.2.50.0110.0459.11
5.2.40.0110.0429.09
5.2.30.0120.0449.07
5.2.20.0130.0589.05
5.2.10.0170.0698.96
5.2.00.0110.0598.82
5.1.60.0090.0428.10
5.1.50.0140.0558.10
5.1.40.0080.0328.08
5.1.30.0050.0408.43
5.1.20.0080.0288.46
5.1.10.0050.0288.18
5.1.00.0090.0258.18
5.0.50.0080.0246.66
5.0.40.0080.0306.52
5.0.30.0130.0466.34
5.0.20.0090.0486.30
5.0.10.0010.0256.27
5.0.00.0060.0296.26
4.4.90.0010.0184.77
4.4.80.0030.0154.75
4.4.70.0050.0144.75
4.4.60.0010.0184.76
4.4.50.0070.0224.77
4.4.40.0070.0354.70
4.4.30.0020.0164.76
4.4.20.0020.0184.85
4.4.10.0020.0174.85
4.4.00.0030.0264.76
4.3.110.0040.0154.67
4.3.100.0010.0174.66
4.3.90.0020.0164.63
4.3.80.0020.0264.59
4.3.70.0020.0174.63
4.3.60.0040.0154.63
4.3.50.0040.0224.63
4.3.40.0030.0334.54
4.3.30.0010.0233.30
4.3.20.0020.0223.28
4.3.10.0030.0233.24
4.3.00.0070.01313.17

preferences:
71.56 ms | 400 KiB | 5 Q