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.0080.01021.95
8.3.40.0140.00318.82
8.3.30.0030.01019.26
8.3.20.0000.00720.22
8.3.10.0030.00523.63
8.3.00.0050.00319.51
8.2.180.0070.00716.63
8.2.170.0070.01022.96
8.2.160.0110.00720.34
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0150.00426.16
8.2.120.0040.00422.30
8.2.110.0030.00622.29
8.2.100.0080.00418.03
8.2.90.0050.00319.27
8.2.80.0040.00418.00
8.2.70.0000.00817.49
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0070.00018.05
8.2.20.0000.00917.74
8.2.10.0080.00019.77
8.2.00.0050.00517.74
8.1.280.0090.00625.92
8.1.270.0050.00323.86
8.1.260.0030.00526.35
8.1.250.0050.00228.09
8.1.240.0040.00423.82
8.1.230.0070.00419.14
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0040.00417.63
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0030.00322.02
8.1.150.0000.01118.63
8.1.140.0030.00617.32
8.1.130.0030.00317.73
8.1.120.0000.00717.36
8.1.110.0040.00417.48
8.1.100.0070.00017.39
8.1.90.0040.00417.36
8.1.80.0070.00017.36
8.1.70.0040.00417.41
8.1.60.0000.00817.57
8.1.50.0040.00417.50
8.1.40.0050.00217.52
8.1.30.0000.00817.54
8.1.20.0000.00817.70
8.1.10.0040.00417.54
8.1.00.0050.00217.40
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0000.00718.42
8.0.270.0000.00817.31
8.0.260.0000.00717.30
8.0.250.0070.00017.07
8.0.240.0070.00017.01
8.0.230.0030.00316.93
8.0.220.0030.00316.95
8.0.210.0040.00416.98
8.0.200.0070.00017.01
8.0.190.0000.00916.89
8.0.180.0000.00816.95
8.0.170.0030.00516.98
8.0.160.0050.00316.91
8.0.150.0040.00316.83
8.0.140.0000.00716.83
8.0.130.0030.00313.42
8.0.120.0000.00716.85
8.0.110.0070.00016.86
8.0.100.0050.00316.82
8.0.90.0030.00516.91
8.0.80.0130.00716.85
8.0.70.0000.00816.86
8.0.60.0000.00716.95
8.0.50.0030.00516.89
8.0.30.0110.00817.21
8.0.20.0140.00517.40
8.0.10.0080.00017.03
8.0.00.0050.01416.63
7.4.330.0000.00515.14
7.4.320.0030.00316.50
7.4.300.0030.00316.48
7.4.290.0000.00716.52
7.4.280.0030.00816.45
7.4.270.0040.00316.50
7.4.260.0020.00516.58
7.4.250.0060.00316.37
7.4.240.0040.00316.59
7.4.230.0050.00216.70
7.4.220.0090.00916.55
7.4.210.0050.00916.53
7.4.200.0040.00416.66
7.4.190.0030.00316.50
7.4.160.0100.00716.43
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0100.00616.53
7.4.120.0100.00816.47
7.4.110.0030.01716.72
7.4.100.0100.01016.73
7.4.90.0030.01316.55
7.4.80.0090.01319.39
7.4.70.0120.00916.57
7.4.60.0080.00816.30
7.4.50.0060.00316.58
7.4.40.0110.00422.77
7.4.30.0140.00916.62
7.4.10.0070.01014.78
7.4.00.0080.01115.06
7.3.330.0020.00213.37
7.3.320.0000.00613.44
7.3.310.0070.00016.19
7.3.300.0070.00016.39
7.3.290.0030.01116.34
7.3.280.0100.00916.37
7.3.270.0100.01017.40
7.3.260.0070.01016.34
7.3.250.0140.00716.35
7.3.240.0100.00716.39
7.3.230.0000.01616.54
7.3.210.0070.01016.27
7.3.200.0090.00919.39
7.3.190.0030.01416.52
7.3.180.0030.01316.36
7.3.170.0090.00916.42
7.3.160.0080.00816.29
7.3.130.0050.00914.66
7.3.120.0030.01314.79
7.3.110.0040.01414.90
7.3.100.0030.01014.95
7.3.90.0070.00714.58
7.3.80.0080.00314.92
7.3.70.0070.00714.77
7.3.60.0070.01014.61
7.3.50.0090.00314.77
7.3.40.0060.00914.93
7.3.30.0130.00314.88
7.3.20.0060.00916.64
7.3.10.0070.00416.52
7.3.00.0070.00716.77
7.2.330.0090.01316.84
7.2.320.0100.00716.69
7.2.310.0140.00416.70
7.2.300.0120.00616.70
7.2.290.0090.00916.87
7.2.260.0060.00914.89
7.2.250.0030.01215.11
7.2.240.0000.01614.71
7.2.230.0090.00614.79
7.2.220.0060.00914.73
7.2.210.0100.00314.99
7.2.200.0070.00714.92
7.2.190.0070.00314.98
7.2.180.0080.00815.16
7.2.170.0070.00714.88
7.2.160.0060.00315.11
7.2.150.0120.00317.04
7.2.140.0130.00317.04
7.2.130.0040.01216.93
7.2.120.0060.01016.60
7.2.110.0040.00416.82
7.2.100.0030.01116.70
7.2.90.0100.00716.71
7.2.80.0040.00817.01
7.2.70.0090.00617.08
7.2.60.0040.00816.84
7.2.50.0040.00716.75
7.2.40.0030.00616.72
7.2.30.0060.00316.73
7.2.20.0060.00917.01
7.2.10.0030.00916.93
7.2.00.0050.00918.10
7.1.330.0030.01015.90
7.1.320.0040.00715.75
7.1.310.0040.01115.65
7.1.300.0070.00315.56
7.1.290.0000.01515.61
7.1.280.0000.01415.87
7.1.270.0070.00715.48
7.1.260.0040.00915.50
7.1.250.0000.01015.86
7.1.240.0000.01315.88
7.1.230.0030.00915.89
7.1.220.0030.01015.80
7.1.210.0080.00615.52
7.1.200.0040.00515.55
7.1.190.0070.01015.92
7.1.180.0090.00315.89
7.1.170.0000.00915.50
7.1.160.0060.01015.84
7.1.150.0060.00615.88
7.1.140.0040.00715.86
7.1.130.0000.00915.79
7.1.120.0070.00715.78
7.1.110.0030.00715.84
7.1.100.0030.00917.07
7.1.90.0030.00915.65
7.1.80.0090.00015.90
7.1.70.0070.00716.38
7.1.60.0080.01117.72
7.1.50.0090.00716.37
7.1.40.0120.00015.62
7.1.30.0040.00915.73
7.1.20.0040.00715.57
7.1.10.0070.00715.48
7.1.00.0080.03819.12
7.0.330.0030.00715.41
7.0.320.0070.00715.51
7.0.310.0040.00815.29
7.0.300.0000.01115.50
7.0.290.0000.01115.39
7.0.280.0040.00415.57
7.0.270.0040.00715.45
7.0.260.0120.00015.46
7.0.250.0100.00315.48
7.0.240.0100.00315.48
7.0.230.0060.00615.57
7.0.220.0040.00715.28
7.0.210.0080.00515.27
7.0.200.0160.00615.11
7.0.190.0080.00515.45
7.0.180.0030.00915.14
7.0.170.0000.00815.30
7.0.160.0000.01315.18
7.0.150.0070.00715.52
7.0.140.0050.03818.66
7.0.130.0060.00615.55
7.0.120.0030.00615.41
7.0.110.0110.00315.50
7.0.100.0060.00615.42
7.0.90.0080.00415.27
7.0.80.0030.01015.48
7.0.70.0070.00415.50
7.0.60.0070.02517.78
7.0.50.0100.03916.67
7.0.40.0070.04516.92
7.0.30.0150.02916.97
7.0.20.0190.03916.80
7.0.10.0150.02216.84
7.0.00.0080.01816.84
5.6.400.0090.00314.32
5.6.390.0030.00914.32
5.6.380.0100.00714.26
5.6.370.0060.01014.56
5.6.360.0040.01114.36
5.6.350.0040.00414.71
5.6.340.0000.01314.57
5.6.330.0130.00014.31
5.6.320.0000.01314.36
5.6.310.0030.01314.39
5.6.300.0080.00414.19
5.6.290.0040.00414.56
5.6.280.0020.04217.63
5.6.270.0060.00614.57
5.6.260.0100.00014.38
5.6.250.0070.01014.13
5.6.240.0070.00714.60
5.6.230.0000.01014.54
5.6.220.0150.00014.29
5.6.210.0110.03817.47
5.6.200.0050.04816.32
5.6.190.0060.02317.40
5.6.180.0170.04317.27
5.6.170.0260.03217.48
5.6.160.0080.04217.46
5.6.150.0050.04716.29
5.6.140.0120.04016.23
5.6.130.0080.04216.39
5.6.120.0100.04117.71
5.6.110.0080.03517.58
5.6.100.0070.04317.89
5.6.90.0130.03517.72
5.6.80.0030.04517.28
5.6.70.1720.01817.36
5.6.60.0070.00714.50
5.6.50.0000.00914.17
5.6.40.0100.00314.63
5.6.30.0030.01014.24
5.6.20.0060.00614.53
5.6.10.0040.01114.24
5.6.00.0000.01014.53
5.5.380.0040.00414.39
5.5.370.0050.00314.39
5.5.360.0030.01214.28
5.5.350.0170.04217.29
5.5.340.0050.02416.22
5.5.330.0040.04517.43
5.5.320.0220.04217.21
5.5.310.0170.04917.46
5.5.300.0090.04515.97
5.5.290.0060.02316.13
5.5.280.0080.04517.59
5.5.270.0030.02517.52
5.5.260.0080.04517.53
5.5.250.0080.04217.31
5.5.240.0030.04017.28
5.5.230.0060.00914.18
5.5.220.0070.01014.21
5.5.210.0030.01313.97
5.5.200.0100.00314.42
5.5.190.0070.00414.05
5.5.180.0030.00614.16
5.5.170.0070.00414.15
5.5.160.0000.01414.14
5.5.150.0000.01313.87
5.5.140.0030.00914.46
5.5.130.0000.01614.41
5.5.120.0000.01413.93
5.5.110.0030.01014.46
5.5.100.0030.00913.94
5.5.90.0080.00414.37
5.5.80.0080.00014.43
5.5.70.0000.01214.31
5.5.60.0000.01813.88
5.5.50.0070.00714.30
5.5.40.0030.01114.39
5.5.30.0070.00314.24
5.5.20.0030.00614.26
5.5.10.0030.01514.26
5.5.00.0040.00714.40
5.4.450.0120.03015.94
5.4.440.0160.02516.01
5.4.430.0050.03516.12
5.4.420.0140.02615.91
5.4.410.0050.04415.99
5.4.400.0140.03215.70
5.4.390.0090.04115.92
5.4.380.0230.02815.68
5.4.370.0250.03115.53
5.4.360.0050.03315.59
5.4.350.0230.03715.69
5.4.340.0200.02315.69
5.4.330.0060.00012.60
5.4.320.0020.02312.56
5.4.310.0060.02012.55
5.4.300.0020.02512.55
5.4.290.0030.02812.54
5.4.280.0060.02212.49
5.4.270.0040.02412.49
5.4.260.0050.02112.49
5.4.250.0060.02212.49
5.4.240.0040.03012.49
5.4.230.0070.02812.49
5.4.220.0090.02512.49
5.4.210.0060.02012.49
5.4.200.0030.02512.49
5.4.190.0060.02012.48
5.4.180.0080.01712.48
5.4.170.0020.02412.49
5.4.160.0040.02012.49
5.4.150.0070.01812.49
5.4.140.0070.01912.33
5.4.130.0040.02112.32
5.4.120.0060.01812.30
5.4.110.0060.02012.30
5.4.100.0030.02112.30
5.4.90.0060.02312.30
5.4.80.0040.02412.30
5.4.70.0100.01812.30
5.4.60.0050.02012.30
5.4.50.0050.01912.30
5.4.40.0020.02212.29
5.4.30.0050.02012.29
5.4.20.0050.02712.29
5.4.10.0020.02612.29
5.4.00.0020.02512.04
5.3.290.0060.02312.70
5.3.280.0030.02512.66
5.3.270.0070.02212.66
5.3.260.0070.02112.66
5.3.250.0090.01612.66
5.3.240.0040.02412.66
5.3.230.0080.02012.66
5.3.220.0100.02612.64
5.3.210.0050.02412.64
5.3.200.0060.02512.64
5.3.190.0060.02612.64
5.3.180.0060.03112.64
5.3.170.0100.02712.64
5.3.160.0060.02212.64
5.3.150.0040.02412.64
5.3.140.0060.01912.63
5.3.130.0080.02012.63
5.3.120.0020.02612.63
5.3.110.0080.02012.63
5.3.100.0050.02012.36
5.3.90.0040.02212.35
5.3.80.0050.02012.35
5.3.70.0040.02312.35
5.3.60.0040.02312.34
5.3.50.0040.02312.32
5.3.40.0050.02212.32
5.3.30.0040.02512.30
5.3.20.0030.02712.19
5.3.10.0060.02012.17
5.3.00.0040.02612.16
5.2.170.0060.0329.23
5.2.160.0050.0299.23
5.2.150.0060.0299.23
5.2.140.0050.0309.23
5.2.130.0070.0279.19
5.2.120.0050.0429.19
5.2.110.0080.0439.19
5.2.100.0080.0419.19
5.2.90.0060.0289.19
5.2.80.0090.0289.18
5.2.70.0060.0309.17
5.2.60.0060.0299.13
5.2.50.0050.0309.10
5.2.40.0030.0319.08
5.2.30.0040.0319.06
5.2.20.0040.0319.04
5.2.10.0100.0258.95
5.2.00.0050.0308.81
5.1.60.0040.0248.10
5.1.50.0030.0268.10
5.1.40.0070.0248.08
5.1.30.0070.0278.43
5.1.20.0070.0298.45
5.1.10.0030.0268.18
5.1.00.0040.0438.18
5.0.50.0040.0246.66
5.0.40.0040.0246.52
5.0.30.0030.0326.34
5.0.20.0010.0226.29
5.0.10.0060.0196.27
5.0.00.0050.0366.27
4.4.90.0030.0224.78
4.4.80.0020.0234.75
4.4.70.0030.0224.75
4.4.60.0020.0194.75
4.4.50.0050.0184.77
4.4.40.0030.0364.71
4.4.30.0030.0224.76
4.4.20.0040.0204.84
4.4.10.0020.0224.84
4.4.00.0050.0254.76
4.3.110.0040.0194.67
4.3.100.0030.0234.66
4.3.90.0040.0194.63
4.3.80.0040.0294.59
4.3.70.0030.0264.63
4.3.60.0040.0254.63
4.3.50.0030.0234.63
4.3.40.0040.0324.54
4.3.30.0030.0223.30
4.3.20.0020.0213.28
4.3.10.0040.0153.24
4.3.00.0000.01710.55

preferences:
40.6 ms | 401 KiB | 5 Q