3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $f; public function __construct(&$f) { $this->f = &$f; } public function __destruct() { $this->f = function() {}; } } $f = function () use (&$f) { $t = new test($f); print "After this line it the Closure should be destroyed...\n"; }; $f(); $f(); var_dump($f);

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.70.0150.00616.63
8.3.60.0110.00718.56
8.3.50.0110.00722.12
8.3.40.0070.00718.87
8.3.30.0080.00819.39
8.3.20.0120.00320.13
8.3.10.0050.00321.92
8.3.00.0070.00022.47
8.2.180.0090.00616.88
8.2.170.0160.00022.96
8.2.160.0080.00620.50
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0030.00617.47
8.2.110.0100.00020.52
8.2.100.0080.00317.72
8.2.90.0040.00419.08
8.2.80.0030.00618.00
8.2.70.0050.00317.63
8.2.60.0090.00017.92
8.2.50.0030.00618.07
8.2.40.0030.00618.22
8.2.30.0070.00018.00
8.2.20.0040.00417.54
8.2.10.0040.00417.67
8.2.00.0070.00017.74
8.1.280.0070.01125.92
8.1.270.0070.00023.86
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0100.00019.15
8.1.220.0000.00917.76
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0080.00017.41
8.1.180.0040.00418.10
8.1.170.0040.00418.36
8.1.160.0000.00821.90
8.1.150.0050.00218.64
8.1.140.0050.00317.50
8.1.130.0000.00717.88
8.1.120.0030.00517.37
8.1.110.0040.00417.28
8.1.100.0050.00217.45
8.1.90.0000.00717.32
8.1.80.0070.00017.42
8.1.70.0030.00317.43
8.1.60.0000.00817.61
8.1.50.0060.00317.48
8.1.40.0000.00717.43
8.1.30.0080.00017.62
8.1.20.0030.00617.63
8.1.10.0000.00817.55
8.1.00.0030.00517.41
8.0.300.0070.00018.77
8.0.290.0040.00417.16
8.0.280.0000.00718.52
8.0.270.0000.00717.21
8.0.260.0070.00016.84
8.0.250.0000.00916.99
8.0.240.0080.00017.03
8.0.230.0070.00016.85
8.0.220.0070.00016.89
8.0.210.0030.00316.88
8.0.200.0000.00716.89
8.0.190.0000.00716.84
8.0.180.0040.00416.95
8.0.170.0030.00516.96
8.0.160.0070.00016.87
8.0.150.0050.00216.93
8.0.140.0030.00316.78
8.0.130.0000.00513.33
8.0.120.0040.00416.84
8.0.110.0040.00416.75
8.0.100.0000.00716.95
8.0.90.0040.00416.70
8.0.80.0070.01016.92
8.0.70.0070.00016.81
8.0.60.0070.00016.78
8.0.50.0000.00716.97
8.0.30.0080.01217.17
8.0.20.0090.00917.40
8.0.10.0040.00417.08
8.0.00.0050.01316.89
7.4.330.0050.00015.09
7.4.320.0030.00616.54
7.4.300.0000.00616.53
7.4.290.0000.00816.62
7.4.280.0070.00016.46
7.4.270.0030.00316.63
7.4.260.0070.00316.47
7.4.250.0030.00616.55
7.4.240.0040.00316.59
7.4.230.0000.00716.49
7.4.220.0100.01716.47
7.4.210.0090.00616.61
7.4.200.0000.00716.41
7.4.190.0000.00716.70
7.4.160.0140.00716.38
7.4.150.0140.00317.40
7.4.140.0110.00717.86
7.4.130.0150.00316.59
7.4.120.0070.01016.52
7.4.110.0170.00416.46
7.4.100.0090.00916.62
7.4.90.0070.01016.55
7.4.80.0140.00919.39
7.4.70.0110.00516.43
7.4.60.0060.00916.60
7.4.50.0060.00316.64
7.4.40.0100.00722.77
7.4.30.0090.01316.59
7.4.00.0040.01114.78
7.3.330.0000.00513.30
7.3.320.0030.00313.22
7.3.310.0030.00316.41
7.3.300.0040.00416.27
7.3.290.0040.01116.28
7.3.280.0080.01016.29
7.3.270.0120.01217.40
7.3.260.0110.00716.32
7.3.250.0090.00816.57
7.3.240.0080.00816.43
7.3.230.0130.00316.39
7.3.210.0100.00616.45
7.3.200.0170.00016.21
7.3.190.0120.00616.60
7.3.180.0000.01516.38
7.3.170.0100.00616.33
7.3.160.0080.00816.45
7.3.120.0100.00314.91
7.2.330.0040.01316.79
7.2.320.0060.01316.51
7.2.310.0140.00716.39
7.2.300.0100.01316.80
7.2.290.0080.00816.54
7.2.60.0100.00316.96
7.2.50.0070.00717.07
7.1.200.0090.00315.40
7.1.70.0070.00016.87
7.1.60.0090.01619.82
7.1.50.0140.01017.04
7.1.00.0030.07722.48
7.0.200.0000.00916.55
7.0.140.0100.06321.95
7.0.60.0070.08320.03
7.0.50.0100.04017.85
7.0.40.0070.08020.13
7.0.30.0300.08020.11
7.0.20.0200.04320.33
7.0.10.0200.03720.12
7.0.00.0100.08720.05
5.6.280.0000.07721.12
5.6.210.0070.07320.70
5.6.200.0070.07318.25
5.6.190.0070.07020.35
5.6.180.4170.04320.77
5.6.170.0200.03720.54
5.6.160.0100.08020.57
5.6.150.0100.06318.16
5.6.140.0070.07718.14
5.6.130.0070.04018.18
5.6.120.0000.08020.99
5.6.110.0030.05720.98
5.6.100.0170.08020.97
5.6.90.0170.08021.05
5.6.80.0100.07720.40
5.6.70.0330.07020.41
5.5.350.0000.05720.38
5.5.340.0100.08018.09
5.5.330.0000.09320.31
5.5.320.0270.08020.34
5.5.310.0370.07020.26
5.5.300.0100.04717.99
5.5.290.0070.08317.95
5.5.280.0000.07720.79
5.5.270.0100.03320.77
5.5.260.0170.07320.66
5.5.250.0030.04720.67
5.5.240.0030.04020.20
5.4.450.0330.05719.47
5.4.440.0270.06719.19
5.4.430.0270.04719.53
5.4.420.0430.06019.62
5.4.410.0270.06019.45
5.4.400.0100.05018.62
5.4.390.0030.05718.42
5.4.380.0330.05018.73
5.4.370.0200.05018.60
5.4.360.0130.05718.71
5.4.350.0200.05318.75
5.4.340.0230.04718.71
5.4.320.0030.04612.51
5.4.310.0040.04412.51
5.4.300.0030.03812.51
5.4.290.0080.03512.51
5.4.280.0060.03612.40
5.4.270.0130.06319.14
5.4.260.0170.06718.91
5.4.250.0170.05319.09
5.4.240.0030.06019.09
5.4.230.0070.06318.84
5.4.220.0170.06019.11
5.4.210.0200.06319.00
5.4.200.0200.06718.83
5.4.190.0200.05318.94
5.4.180.0170.08019.13
5.4.170.0130.05018.82
5.4.160.0230.06319.08
5.4.150.0170.06018.89
5.4.140.0100.07316.71
5.4.130.0170.06016.59
5.4.120.0170.05316.56
5.4.110.0130.04716.70
5.4.100.0100.07016.68
5.4.90.0100.05716.61
5.4.80.0070.07016.73
5.4.70.0070.05016.68
5.4.60.0130.04316.39
5.4.50.0030.07016.49
5.4.40.0070.05016.69
5.4.30.0170.06316.38
5.4.20.0100.07016.45
5.4.10.0100.06016.61
5.4.00.0100.05015.84
5.3.290.0050.04012.80
5.3.280.0070.07714.49
5.3.270.0100.06314.93
5.3.260.0200.07014.89
5.3.250.0130.05014.47
5.3.240.0100.05014.50
5.3.230.0100.07014.78
5.3.220.0170.06714.46
5.3.210.0130.05714.87
5.3.200.0170.04714.70
5.3.190.0100.06714.76
5.3.180.0130.05014.46
5.3.170.0130.04714.58
5.3.160.0130.05314.86
5.3.150.0000.06314.84
5.3.140.0200.04014.63
5.3.130.0070.06014.57
5.3.120.0070.06014.62
5.3.110.0070.05314.79
5.3.100.0070.06313.93
5.3.90.0130.05714.11
5.3.80.0100.06013.90
5.3.70.0130.06314.08
5.3.60.0030.06314.13
5.3.50.0100.04714.17
5.3.40.0100.05014.25
5.3.30.0030.05313.98
5.3.20.0100.06713.89
5.3.10.0100.04313.96
5.3.00.0100.06713.69
5.2.170.0030.05311.32
5.2.160.0100.05711.37
5.2.150.0070.04011.29
5.2.140.0130.03711.33
5.2.130.0070.04711.29
5.2.120.0070.05311.32
5.2.110.0070.04311.32
5.2.100.0070.04711.40
5.2.90.0200.04011.06
5.2.80.0070.04011.14
5.2.70.0070.04311.39
5.2.60.0130.04711.24
5.2.50.0030.04711.31
5.2.40.0130.04711.18
5.2.30.0070.05011.03
5.2.20.0070.05711.17
5.2.10.0070.05311.06
5.2.00.0070.05310.91
5.1.60.0070.05010.25
5.1.50.0130.04010.32
5.1.40.0070.03310.08
5.1.30.0070.03310.60
5.1.20.0030.06010.64
5.1.10.0070.03710.22
5.1.00.0030.04310.34
5.0.50.0070.0278.45
5.0.40.0070.0338.49
5.0.30.0000.0478.21
5.0.20.0070.0238.45
5.0.10.0030.0308.38
5.0.00.0030.0438.04
4.4.90.0000.0277.37
4.4.80.0000.0277.37
4.4.70.0000.0307.37
4.4.60.0000.0337.37
4.4.50.0000.0237.37
4.4.40.0030.0377.37
4.4.30.0070.0207.37
4.4.20.0030.0207.37
4.4.10.0030.0337.37
4.4.00.0000.0377.37
4.3.110.0030.0237.37
4.3.100.0070.0237.37
4.3.90.0030.0277.37
4.3.80.0030.0437.37
4.3.70.0000.0277.37
4.3.60.0000.0237.37
4.3.50.0000.0277.37
4.3.40.0030.0407.37
4.3.30.0000.0237.37
4.3.20.0070.0277.37
4.3.10.0100.0137.37
4.3.00.0070.0234.43

preferences:
54.66 ms | 401 KiB | 5 Q