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.0070.00716.63
8.3.50.0110.00622.14
8.3.40.0070.00718.79
8.3.30.0140.00319.04
8.3.20.0000.00720.34
8.3.10.0040.00423.57
8.3.00.0050.00319.38
8.2.180.0070.00718.39
8.2.170.0160.00022.96
8.2.160.0030.01720.39
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.10
8.2.110.0040.00720.39
8.2.100.0080.00417.91
8.2.90.0050.00317.92
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0040.00417.89
8.2.50.0040.00418.07
8.2.40.0050.00320.01
8.2.30.0050.00219.76
8.2.20.0080.00017.75
8.2.10.0040.00417.99
8.2.00.0040.00717.74
8.1.280.0070.00725.92
8.1.270.0030.00623.86
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00022.02
8.1.230.0040.00820.89
8.1.220.0050.00317.74
8.1.210.0050.00318.91
8.1.200.0040.00417.36
8.1.190.0060.00317.25
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0070.00021.95
8.1.150.0050.00518.64
8.1.140.0030.00617.33
8.1.130.0030.00317.86
8.1.120.0030.00417.52
8.1.110.0000.00717.49
8.1.100.0040.00417.36
8.1.90.0040.00417.39
8.1.80.0070.00017.48
8.1.70.0000.00717.35
8.1.60.0070.00017.61
8.1.50.0000.00817.51
8.1.40.0000.00917.48
8.1.30.0040.00417.57
8.1.20.0050.00417.68
8.1.10.0060.00317.56
8.1.00.0080.00017.53
8.0.300.0060.00319.87
8.0.290.0040.00417.05
8.0.280.0070.00018.45
8.0.270.0050.00217.18
8.0.260.0000.00617.18
8.0.250.0030.00317.08
8.0.240.0060.00016.91
8.0.230.0030.00317.00
8.0.220.0030.00317.02
8.0.210.0000.00716.84
8.0.200.0060.00016.88
8.0.190.0060.00316.89
8.0.180.0040.00416.88
8.0.170.0000.00716.87
8.0.160.0000.00716.88
8.0.150.0030.00516.86
8.0.140.0000.00716.87
8.0.130.0060.00013.35
8.0.120.0030.00616.93
8.0.110.0040.00416.98
8.0.100.0080.00016.92
8.0.90.0080.00016.96
8.0.80.0090.00616.98
8.0.70.0070.00016.84
8.0.60.0050.00217.06
8.0.50.0000.00816.77
8.0.30.0120.01017.14
8.0.20.0120.00817.40
8.0.10.0000.00717.18
8.0.00.0110.00716.79
7.4.330.0030.00315.15
7.4.320.0030.00316.46
7.4.300.0030.00316.50
7.4.290.0040.00416.60
7.4.280.0060.00316.67
7.4.270.0030.00416.59
7.4.260.0000.00716.50
7.4.250.0040.00416.49
7.4.240.0020.00516.53
7.4.230.0030.00316.58
7.4.220.0130.00716.55
7.4.210.0050.01016.58
7.4.200.0080.00016.34
7.4.190.0020.00516.38
7.4.160.0090.00616.70
7.4.150.0140.01017.40
7.4.140.0110.00617.86
7.4.130.0130.00516.50
7.4.120.0150.00316.62
7.4.110.0160.00316.70
7.4.100.0070.01016.45
7.4.90.0130.00616.43
7.4.80.0120.00619.39
7.4.70.0070.01416.68
7.4.60.0130.00316.49
7.4.50.0000.00716.53
7.4.40.0120.00622.77
7.4.30.0060.01216.45
7.4.00.0090.00915.10
7.3.330.0030.00313.38
7.3.320.0050.00013.38
7.3.310.0000.00716.40
7.3.300.0070.00016.38
7.3.290.0140.00016.41
7.3.280.0090.00716.35
7.3.270.0100.00717.40
7.3.260.0140.01116.36
7.3.250.0090.01116.48
7.3.240.0090.00816.49
7.3.230.0040.01416.54
7.3.210.0090.00916.33
7.3.200.0100.01319.39
7.3.190.0060.01116.54
7.3.180.0100.01016.54
7.3.170.0150.00316.30
7.3.160.0040.01216.51
7.3.120.0130.00314.81
7.2.330.0060.01516.63
7.2.320.0130.01016.73
7.2.310.0000.02316.41
7.2.300.0090.01316.81
7.2.290.0120.01216.73
7.2.60.0030.01016.80
7.2.00.0030.01119.46
7.1.200.0040.00715.72
7.1.100.0060.00618.39
7.1.70.0040.00417.17
7.1.60.0090.01519.46
7.1.50.0040.01116.95
7.1.00.0030.07322.36
7.0.200.1200.00314.40
7.0.140.0070.07021.97
7.0.60.0000.07719.82
7.0.50.0000.04317.89
7.0.40.0100.04020.07
7.0.30.0100.04720.20
7.0.20.0300.07320.19
7.0.10.0100.04020.35
7.0.00.0070.03720.26
5.6.280.0070.07021.07
5.6.210.0030.05020.73
5.6.200.0070.05018.22
5.6.190.0070.06020.61
5.6.180.0430.06320.41
5.6.170.0230.07720.66
5.6.160.0030.08720.50
5.6.150.0100.08018.28
5.6.140.0030.04018.16
5.6.130.0200.06018.14
5.6.120.0130.03321.02
5.6.110.0130.07020.96
5.6.100.0130.06721.01
5.6.90.0170.07321.00
5.6.80.0100.08020.54
5.5.350.4130.04720.50
5.5.340.0000.04718.07
5.5.330.0070.04020.31
5.5.320.0200.06320.35
5.5.310.0270.07720.26
5.5.300.0070.04018.08
5.5.290.0000.06717.98
5.5.280.0100.08320.77
5.5.270.0030.04320.87
5.5.260.0100.07720.80
5.5.250.0100.05320.69
5.5.240.0200.03020.15
5.4.450.0270.05019.50
5.4.440.0370.06319.37
5.4.430.0330.06719.34
5.4.420.0230.06319.21
5.4.410.0230.05018.99
5.4.400.0200.04319.26
5.4.390.0270.06718.89
5.4.380.0270.05019.03
5.4.370.0230.06719.02
5.4.360.0230.04318.82
5.4.350.0170.04018.89
5.4.340.0230.03719.26
5.4.320.0200.04319.27
5.4.310.0230.07318.94
5.4.300.0330.03319.03
5.4.290.0230.07319.25
5.4.280.0270.03719.06
5.4.270.0330.04019.00
5.4.260.0330.07319.26
5.4.250.0300.06719.14
5.4.240.0330.06718.93
5.4.230.0270.06019.17
5.4.220.0300.06319.03
5.4.210.0270.03718.86
5.4.200.0270.03318.82
5.4.190.0200.03718.98
5.4.180.0270.03318.78
5.4.170.0200.03718.76
5.4.160.0230.03718.77
5.4.150.0170.04718.91
5.4.140.0300.04016.29
5.4.130.0270.06316.50
5.4.120.0270.05316.34
5.4.110.0270.04016.43
5.4.100.0270.06716.18
5.4.90.0230.03716.47
5.4.80.0330.05016.43
5.4.70.0230.03716.42
5.4.60.0300.02716.52
5.4.50.0200.03716.38
5.4.40.0170.03716.25
5.4.30.0200.03316.52
5.4.20.0230.06716.21
5.4.10.0230.06716.51
5.4.00.0230.07015.71
5.3.290.0230.07714.65
5.3.280.0130.05014.82
5.3.270.0300.06714.66
5.3.260.0230.04314.53
5.3.250.0270.06714.62
5.3.240.0230.04014.69
5.3.230.0270.07014.69
5.3.220.0170.03714.58
5.3.210.0270.05314.80
5.3.200.0170.04314.66
5.3.190.0270.04714.63
5.3.180.0230.05714.60
5.3.170.0270.06714.54
5.3.160.0200.05714.50
5.3.150.0270.06314.50
5.3.140.0300.06714.57
5.3.130.0170.04014.70
5.3.120.0300.07014.68
5.3.110.0200.04714.55
5.3.100.0230.03314.16
5.3.90.0200.03714.00
5.3.80.0170.03714.03
5.3.70.0200.04014.14
5.3.60.0330.06314.10
5.3.50.0230.06313.86
5.3.40.0200.06013.86
5.3.30.0270.06013.84
5.3.20.0200.03713.61
5.3.10.0170.03713.59
5.3.00.0200.05713.57
5.2.170.0200.03712.25
5.2.160.0200.02712.25
5.2.150.0170.04712.25
5.2.140.0130.03712.25
5.2.130.0230.03312.25
5.2.120.0170.05712.25
5.2.110.0170.04012.25
5.2.100.0230.05312.25
5.2.90.0300.05312.25
5.2.80.0200.04312.25
5.2.70.0170.02712.25
5.2.60.0170.02712.25
5.2.50.0230.06312.25
5.2.40.0100.03012.25
5.2.30.0170.02312.25
5.2.20.0030.03712.25
5.2.10.0230.02312.25
5.2.00.0130.02712.25
5.1.60.0200.04312.25
5.1.50.0130.02312.25
5.1.40.0030.04312.25
5.1.30.0100.03012.25
5.1.20.0100.02712.25
5.1.10.0130.04012.25
5.1.00.0170.04712.25
5.0.50.0070.02712.25
5.0.40.0070.02312.25
5.0.30.0070.06312.25
5.0.20.0070.04312.25
5.0.10.0130.03712.25
5.0.00.0070.04312.25
4.4.90.0100.01312.25
4.4.80.0070.01312.25
4.4.70.0100.03312.25
4.4.60.0030.01712.25
4.4.50.0030.01712.25
4.4.40.0070.02312.25
4.4.30.0070.01712.25
4.4.20.0170.02312.25
4.4.10.0130.02312.25
4.4.00.0070.04312.25
4.3.110.0070.02012.25
4.3.100.0070.02312.25
4.3.90.0070.01712.25
4.3.80.0130.05012.25
4.3.70.0070.02312.25
4.3.60.0130.01312.25
4.3.50.0100.03712.25
4.3.40.0100.04712.25
4.3.30.0030.02712.25
4.3.20.0070.02012.25
4.3.10.0030.03312.25
4.3.00.0030.03012.25

preferences:
42.08 ms | 401 KiB | 5 Q