3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foobar { public $baz; function __destruct() { # Don't do either of these, if $baz also has a __destruct()! $this->baz = null; unset($this->baz); # Instead, don't clear it at all, or do this: $this->baz->__destruct(); } } # Some function that throws an exception function fail($foobar) { throw new Exception("Exception A!"); } $foobar = new Foobar(); $foobar->baz = new Foobar(); try { fail($foobar); // Send foobar to func that throws an Exception } catch( Exception $e ) { print $e->getMessage(); // Exception A will be caught and printed, as expected. } $foobar = null; // clearing foobar, and its property $baz try { print 'Exception B:';// this will be printed // output stops here. throw new Exception("Exception B!"); } catch( Exception $e ) { print $e->getMessage(); // doesn't happen } print 'End'; // this won't be printed ?>

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.0150.00016.75
8.3.50.0130.00517.39
8.3.40.0030.01318.80
8.3.30.0120.00918.97
8.3.20.0040.00418.93
8.3.10.0000.00818.67
8.3.00.0000.00819.51
8.2.180.0110.00716.75
8.2.170.0110.00322.96
8.2.160.0070.00718.99
8.2.150.0080.00024.18
8.2.140.0110.00724.66
8.2.130.0070.01026.16
8.2.120.0090.00019.95
8.2.110.0090.00020.52
8.2.100.0080.00417.91
8.2.90.0040.00419.47
8.2.80.0050.00219.21
8.2.70.0040.00417.62
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0080.00018.22
8.2.30.0080.00017.98
8.2.20.0060.00317.75
8.2.10.0070.00017.80
8.2.00.0060.00317.70
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0040.01326.35
8.1.250.0040.00428.09
8.1.240.0110.00020.69
8.1.230.0070.00420.96
8.1.220.0040.00417.74
8.1.210.0030.00718.77
8.1.200.0030.00617.48
8.1.190.0070.00017.53
8.1.180.0000.00818.10
8.1.170.0030.00618.90
8.1.160.0000.00718.82
8.1.150.0050.00318.70
8.1.140.0040.00417.32
8.1.130.0000.00717.79
8.1.120.0000.00717.45
8.1.110.0000.00917.37
8.1.100.0020.00517.42
8.1.90.0000.00717.54
8.1.80.0070.00017.39
8.1.70.0000.00717.35
8.1.60.0000.00717.56
8.1.50.0040.00417.45
8.1.40.0050.00317.48
8.1.30.0040.00417.55
8.1.20.0020.00517.63
8.1.10.0050.00217.60
8.1.00.0050.00317.46
8.0.300.0080.00020.03
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0000.00717.18
8.0.260.0030.00316.90
8.0.250.0000.00816.93
8.0.240.0000.00716.99
8.0.230.0030.00416.86
8.0.220.0050.00316.83
8.0.210.0000.00716.80
8.0.200.0040.00416.99
8.0.190.0080.00016.99
8.0.180.0000.01016.91
8.0.170.0000.00916.84
8.0.160.0050.00216.91
8.0.150.0030.00616.87
8.0.140.0050.00516.81
8.0.130.0000.00513.46
8.0.120.0040.00416.93
8.0.110.0040.00316.84
8.0.100.0050.00316.84
8.0.90.0000.00716.96
8.0.80.0000.01417.03
8.0.70.0040.00416.78
8.0.60.0080.00016.86
8.0.50.0000.00716.93
8.0.30.0060.01517.35
8.0.20.0160.00617.14
8.0.10.0000.00717.16
8.0.00.0110.00916.89
7.4.330.0030.00312.98
7.4.320.0030.00316.60
7.4.300.0030.00316.54
7.4.290.0030.00316.64
7.4.280.0000.00716.54
7.4.270.0040.00416.52
7.4.260.0000.00513.28
7.4.250.0050.00316.62
7.4.240.0080.00016.44
7.4.230.0000.00716.45
7.4.220.0070.01116.61
7.4.210.0060.00916.55
7.4.200.0040.00416.27
7.4.190.0070.00016.68
7.4.160.0030.01316.28
7.4.150.0030.01516.43
7.4.140.0230.00016.47
7.4.130.0130.00316.48
7.4.120.0100.00716.51
7.4.110.0120.00616.53
7.4.100.0060.01016.79
7.4.90.0070.01716.70
7.4.80.0100.01319.39
7.4.70.0100.00716.59
7.4.60.0100.00616.51
7.4.50.0020.00216.51
7.4.40.0030.00916.51
7.4.30.0040.01116.43
7.4.10.0100.00615.00
7.4.00.0050.01115.15
7.3.330.0030.00313.25
7.3.320.0030.00313.19
7.3.310.0070.00016.35
7.3.300.0040.00416.44
7.3.290.0110.00516.39
7.3.280.0050.01116.41
7.3.270.0090.00916.48
7.3.260.0140.00316.28
7.3.250.0160.00416.52
7.3.240.0170.00316.47
7.3.230.0160.00016.53
7.3.210.0060.01116.46
7.3.200.0000.01716.67
7.3.190.0110.01216.62
7.3.180.0090.00616.42
7.3.170.0060.00916.38
7.3.160.0130.00316.48
7.3.130.0120.00514.92
7.3.120.0080.00514.75
7.3.110.0090.00914.91
7.3.100.0050.01014.83
7.3.90.0080.00514.83
7.3.80.0050.01014.76
7.3.70.0080.00614.87
7.3.60.0050.01014.50
7.3.50.0050.00914.64
7.3.40.0050.00914.77
7.3.30.0070.00714.86
7.3.20.0060.00716.67
7.3.10.0030.01116.60
7.3.00.0040.00916.31
7.2.330.0120.01216.54
7.2.320.0110.00716.60
7.2.310.0150.00416.78
7.2.300.0180.00616.81
7.2.290.0090.01316.57
7.2.260.0070.00715.03
7.2.250.0090.00715.26
7.2.240.0060.00614.91
7.2.230.0030.01214.87
7.2.220.0080.01015.07
7.2.210.0100.00515.22
7.2.200.0050.01114.96
7.2.190.0040.01014.98
7.2.180.0110.00515.06
7.2.170.0060.00615.09
7.2.160.0080.00515.07
7.2.150.0090.00616.88
7.2.140.0090.00517.00
7.2.130.0060.00716.82
7.2.120.0100.00516.75
7.2.110.0030.01016.89
7.2.100.0040.01116.66
7.2.90.0080.00616.75
7.2.80.0040.01116.72
7.2.70.0060.00616.78
7.2.60.0060.01116.96
7.2.50.0080.00616.73
7.2.40.0050.00816.93
7.2.30.0060.00816.85
7.2.20.0090.00816.90
7.2.10.0080.00916.73
7.2.00.0070.01017.44
7.1.330.0080.00615.81
7.1.320.0080.00615.61
7.1.310.0060.01115.63
7.1.300.0110.00515.72
7.1.290.0070.00715.53
7.1.280.0040.01015.54
7.1.270.0030.00815.57
7.1.260.0070.00715.69
7.1.250.0070.00615.65
7.1.240.0030.01015.79
7.1.230.0070.00615.70
7.1.220.0050.00715.58
7.1.210.0040.01115.73
7.1.200.0040.00815.76
7.1.190.0050.00815.79
7.1.180.0020.01015.63
7.1.170.0030.01015.81
7.1.160.0070.00515.63
7.1.150.0040.01115.54
7.1.140.0020.00815.72
7.1.130.0030.01115.85
7.1.120.0060.00815.65
7.1.110.0060.00615.74
7.1.100.0060.00716.44
7.1.90.0090.00715.69
7.1.80.0060.00815.71
7.1.70.0080.00316.26
7.1.60.0090.01116.95
7.1.50.0090.00916.04
7.1.40.0050.00815.67
7.1.30.0020.01115.72
7.1.20.0040.00915.62
7.1.10.0050.00815.81
7.1.00.0050.01518.03
7.0.330.0030.00915.22
7.0.320.0060.00615.22
7.0.310.0080.00315.39
7.0.300.0090.00615.16
7.0.290.0100.00315.50
7.0.280.0040.00415.39
7.0.270.0060.00615.37
7.0.260.0000.01415.26
7.0.250.0040.00715.24
7.0.240.0050.00915.20
7.0.230.0050.00715.41
7.0.220.0040.00715.45
7.0.210.0080.00715.29
7.0.200.0110.00515.85
7.0.190.0070.00515.36
7.0.180.0060.00515.33
7.0.170.0100.00315.33
7.0.160.0080.00515.20
7.0.150.0080.00615.34
7.0.140.0090.02317.59
7.0.130.0060.00515.38
7.0.120.0030.00815.59
7.0.110.0060.00515.40
7.0.100.0040.03217.54
7.0.90.0080.02017.56
7.0.80.0060.02717.46
7.0.70.0020.03717.56
7.0.60.0050.02817.54
7.0.50.0030.03217.74
7.0.40.0030.03315.62
7.0.30.0080.03015.59
7.0.20.0070.03015.56
7.0.10.0040.03315.57
7.0.00.0080.03015.64
5.6.400.0060.00814.41
5.6.390.0060.00714.28
5.6.380.0040.00914.22
5.6.370.0040.00714.38
5.6.360.0070.00614.36
5.6.350.0050.00814.56
5.6.340.0060.00814.58
5.6.330.0120.00314.60
5.6.320.0090.00714.45
5.6.310.0050.00714.44
5.6.300.0030.01014.59
5.6.290.0020.01214.59
5.6.280.0050.03116.52
5.6.270.0060.00714.33
5.6.260.0080.00414.49
5.6.250.0040.03116.42
5.6.240.0030.03216.50
5.6.230.0060.02216.44
5.6.220.0060.03116.34
5.6.210.0050.03316.54
5.6.200.0040.01816.61
5.6.190.0050.03316.64
5.6.180.0020.03416.42
5.6.170.0050.03316.46
5.6.160.0090.03016.55
5.6.150.0050.03316.51
5.6.140.0080.02116.52
5.6.130.0090.02916.68
5.6.120.0040.03516.62
5.6.110.0080.02816.50
5.6.100.0070.03216.54
5.6.90.0050.03116.63
5.6.80.0110.02216.34
5.6.70.0060.03416.26
5.6.60.0070.02816.23
5.6.50.0070.03016.41
5.6.40.0080.03116.23
5.6.30.0060.02816.33
5.6.20.0090.01816.32
5.6.10.0040.02816.31
5.6.00.0060.02716.34
5.5.380.0050.02216.19
5.5.370.0070.03016.43
5.5.360.0060.03016.43
5.5.350.0080.03116.24
5.5.340.0110.02916.36
5.5.330.0050.03416.45
5.5.320.0020.03916.35
5.5.310.0060.03216.43
5.5.300.0080.02916.28
5.5.290.0070.03116.34
5.5.280.0100.02716.55
5.5.270.0090.02816.40
5.5.260.0040.03116.31
5.5.250.0070.03216.36
5.5.240.0070.03516.13
5.5.230.0060.03316.17
5.5.220.0040.02416.16
5.5.210.0060.02616.27
5.5.200.0060.03116.10
5.5.190.0020.03616.13
5.5.180.0050.03016.14
5.5.170.0050.00914.18
5.5.160.0090.02816.16
5.5.150.0060.03116.04
5.5.140.0040.03116.30
5.5.130.0050.02716.26
5.5.120.0030.02716.20
5.5.110.0040.03316.16
5.5.100.0030.03516.14
5.5.90.0050.02816.00
5.5.80.0060.03116.26
5.5.70.0040.03115.94
5.5.60.0100.02916.18
5.5.50.0060.03116.20
5.5.40.0080.03016.19
5.5.30.0030.03216.14
5.5.20.0060.03216.09
5.5.10.0060.03016.09
5.5.00.0060.02515.86
5.4.450.0060.03013.91
5.4.440.0040.01913.77
5.4.430.0060.02913.93
5.4.420.0050.02513.96
5.4.410.0040.03013.85
5.4.400.0030.03413.80
5.4.390.0020.02213.72
5.4.380.0070.02313.71
5.4.370.0100.02513.79
5.4.360.0050.02913.71
5.4.350.0060.01813.79
5.4.340.0040.03013.67
5.4.330.0040.00711.05
5.4.320.0080.02713.66
5.4.310.0070.02613.85
5.4.300.0060.01913.64
5.4.290.0040.03213.71
5.4.280.0050.02713.70
5.4.270.0050.02813.73
5.4.260.0050.03313.81
5.4.250.0030.03213.82
5.4.240.0060.02813.57
5.4.230.0020.03013.70
5.4.220.0070.02613.62
5.4.210.0030.03013.79
5.4.200.0010.02213.76
5.4.190.0060.02913.62
5.4.180.0090.02513.72
5.4.170.0050.02813.64
5.4.160.0080.02513.63
5.4.150.0030.03013.61
5.4.140.0030.02812.82
5.4.130.0070.02712.81
5.4.120.0090.02612.98
5.4.110.0030.03012.88
5.4.100.0030.03012.84
5.4.90.0070.02112.94
5.4.80.0020.03012.85
5.4.70.0020.02112.74
5.4.60.0040.02712.79
5.4.50.0040.02912.79
5.4.40.0120.02412.83
5.4.30.0060.02612.89
5.4.20.0050.02812.91
5.4.10.0020.03012.95
5.4.00.0070.01712.70
5.3.290.0040.02912.06
5.3.280.0050.02811.96
5.3.270.0070.02611.95
5.3.260.0040.02712.03
5.3.250.0010.02412.02
5.3.240.0060.02811.89
5.3.230.0060.02611.91
5.3.220.0010.02711.82
5.3.210.0070.02611.88
5.3.200.0060.02811.91
5.3.190.0030.03011.85
5.3.180.0030.02511.88
5.3.170.0060.02912.02
5.3.160.0020.03011.97
5.3.150.0040.02912.02
5.3.140.0060.02811.95
5.3.130.0040.02911.91
5.3.120.0080.02811.98
5.3.110.0030.03011.77
5.3.100.0070.02711.79
5.3.90.0050.01811.82
5.3.80.0030.02911.76
5.3.70.0030.03011.65
5.3.60.0060.01711.70
5.3.50.0060.02811.64
5.3.40.0070.02911.72
5.3.30.0070.02611.61
5.3.20.0060.02311.63
5.3.10.0050.02711.50
5.3.00.0030.02811.44
5.2.170.0000.05711.18
5.2.160.0000.03311.06
5.2.150.0070.06311.04
5.2.140.0030.05711.18
5.2.130.0030.06311.17
5.2.120.0030.05311.11
5.2.110.0100.05711.16
5.2.100.0030.06311.17
5.2.90.0030.05711.17
5.2.80.0070.03711.19
5.2.70.0000.06311.09
5.2.60.0000.04011.20
5.2.50.0000.06011.07
5.2.40.0030.06311.00
5.2.30.0070.06011.03
5.2.20.0070.06310.98
5.2.10.0100.05710.88
5.2.00.0030.06310.86
5.1.60.0170.04310.10
5.1.50.0030.05310.02
5.1.40.0070.0479.87
5.1.30.0030.06010.45
5.1.20.0000.06010.44
5.1.10.0100.0439.75
5.1.00.0100.02710.00
5.0.50.0000.0408.26
5.0.40.0030.0438.22
5.0.30.0030.0438.11
5.0.20.0000.0338.23
5.0.10.0070.0438.06
5.0.00.0000.0678.19
4.4.90.0030.0177.77
4.4.80.0030.0377.77
4.4.70.0030.0177.77
4.4.60.0000.0337.77
4.4.50.0000.0377.77
4.4.40.0000.0537.77
4.4.30.0000.0377.77
4.4.20.0030.0337.78
4.4.10.0000.0337.78
4.4.00.0000.0537.78
4.3.110.0000.0277.78
4.3.100.0000.0237.78
4.3.90.0000.0377.78
4.3.80.0030.0507.78
4.3.70.0000.0337.78
4.3.60.0000.0337.78
4.3.50.0030.0307.78
4.3.40.0000.0507.78
4.3.30.0030.0337.78
4.3.20.0000.0337.78
4.3.10.0000.0377.78
4.3.00.0070.0277.78

preferences:
63.25 ms | 401 KiB | 5 Q