3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClosure { private $a = 'a'; private $b = 'b'; public function testClosures() { $testClosure = function($var) { echo $var . ' ' . $this->a . ' ' . $this->b; }; $testClosure('hello!'); } } $testClosures = new TestClosure(); $testClosures->testClosures();

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.0120.00916.63
8.3.50.0120.00818.34
8.3.40.0070.00718.90
8.3.30.0120.00918.80
8.3.20.0090.00018.76
8.3.10.0080.00020.53
8.3.00.0040.00417.63
8.2.180.0070.01416.50
8.2.170.0090.00922.96
8.2.160.0140.00022.31
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00419.95
8.2.110.0070.00320.97
8.2.100.0040.00817.91
8.2.90.0000.00819.18
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0080.00017.93
8.2.50.0030.00618.10
8.2.40.0000.00718.12
8.2.30.0000.00818.02
8.2.20.0000.00717.57
8.2.10.0000.00717.67
8.2.00.0060.00317.61
8.1.280.0070.00725.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00021.29
8.1.230.0060.00917.82
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0000.00817.35
8.1.180.0000.00918.10
8.1.170.0000.00718.88
8.1.160.0030.00518.93
8.1.150.0000.00818.71
8.1.140.0040.00417.41
8.1.130.0000.00717.82
8.1.120.0030.00417.43
8.1.110.0040.00417.52
8.1.100.0040.00417.36
8.1.90.0000.00817.49
8.1.80.0050.00217.46
8.1.70.0030.00317.47
8.1.60.0070.00017.63
8.1.50.0040.00417.41
8.1.40.0050.00317.52
8.1.30.0000.00717.61
8.1.20.0030.00517.55
8.1.10.0070.00017.51
8.1.00.0020.00517.54
8.0.300.0050.00219.21
8.0.290.0000.00716.75
8.0.280.0070.00018.37
8.0.270.0000.00717.14
8.0.260.0030.00316.78
8.0.250.0050.00316.86
8.0.240.0030.00617.00
8.0.230.0030.00316.82
8.0.220.0070.00016.80
8.0.210.0000.00816.85
8.0.200.0030.00316.79
8.0.190.0040.00416.98
8.0.180.0050.00316.91
8.0.170.0000.01016.80
8.0.160.0000.00816.83
8.0.150.0070.00016.85
8.0.140.0070.00016.76
8.0.130.0060.00013.41
8.0.120.0040.00416.84
8.0.110.0000.00816.72
8.0.100.0080.00016.92
8.0.90.0060.00216.82
8.0.80.0120.00316.93
8.0.70.0000.00816.71
8.0.60.0000.00716.85
8.0.50.0070.00016.78
8.0.30.0140.00516.94
8.0.20.0140.00617.19
8.0.10.0000.00717.07
8.0.00.0130.00716.79
7.4.330.0050.00013.05
7.4.320.0000.00616.55
7.4.300.0060.00016.60
7.4.290.0000.00716.51
7.4.280.0030.00616.50
7.4.270.0040.00416.53
7.4.260.0000.00813.23
7.4.250.0060.00316.56
7.4.240.0000.00716.54
7.4.230.0070.00016.51
7.4.220.0070.01016.48
7.4.210.0040.01016.60
7.4.200.0070.00016.39
7.4.190.0040.00416.59
7.4.150.0120.00616.52
7.4.140.0080.01116.58
7.4.130.0150.00316.48
7.4.120.0070.01216.45
7.4.110.0120.00916.41
7.4.100.0070.01116.60
7.4.90.0120.00616.59
7.4.80.0120.01216.41
7.4.70.0140.00516.35
7.4.60.0170.00016.45
7.4.50.0000.00716.77
7.4.40.0030.01116.57
7.4.30.0100.00616.69
7.4.00.0060.00315.03
7.3.330.0000.00613.25
7.3.320.0060.00013.21
7.3.310.0000.00716.17
7.3.300.0030.00316.30
7.3.290.0070.01316.22
7.3.280.0080.00816.25
7.3.270.0040.02116.58
7.3.260.0120.01316.51
7.3.250.0060.01116.39
7.3.240.0090.00816.67
7.3.230.0110.00616.50
7.3.210.0170.00016.52
7.3.200.0130.01419.39
7.3.190.0060.01116.27
7.3.180.0060.00916.57
7.3.170.0070.01116.25
7.3.160.0030.01216.41
7.3.120.0060.00614.99
7.2.330.0100.01016.79
7.2.320.0030.01416.52
7.2.310.0090.01316.84
7.2.300.0140.00516.77
7.2.290.0090.00916.60
7.2.60.0000.01216.99
7.2.00.0090.00618.99
7.1.200.0030.00615.82
7.1.100.0080.00417.94
7.1.70.0040.00417.27
7.1.60.0070.01719.40
7.1.50.0070.01516.91
7.1.00.0030.03722.51
7.0.200.0120.00414.57
7.0.140.0070.07021.92
7.0.120.0030.06322.16
7.0.60.0130.03319.94
7.0.50.0030.05717.88
7.0.40.0070.09020.05
7.0.30.0330.05020.08
7.0.20.0300.07320.15
7.0.10.0100.03720.25
7.0.00.0100.08320.15
5.6.280.0000.07720.90
5.6.210.0030.08320.73
5.6.200.0100.07318.20
5.6.190.0100.09020.33
5.6.180.0270.07020.63
5.6.170.0270.08020.55
5.6.160.0070.03720.71
5.6.150.0000.09018.23
5.6.140.0070.03718.19
5.6.130.0070.04318.13
5.6.120.0100.07020.90
5.6.110.0070.04021.12
5.6.100.0200.06721.03
5.6.90.0200.05721.11
5.6.80.0030.07720.52
5.5.350.0170.08320.34
5.5.340.0100.04318.09
5.5.330.0100.03320.29
5.5.320.0230.07720.31
5.5.310.0300.08720.21
5.5.300.0100.05317.95
5.5.290.0100.03317.98
5.5.280.0100.05720.88
5.5.270.0100.06720.64
5.5.260.0000.08720.77
5.5.250.0030.08720.70
5.5.240.0100.07020.28
5.4.450.0030.07319.53
5.4.440.0030.04319.57
5.4.430.0070.07019.47
5.4.420.0100.04719.29
5.4.410.0070.08019.05
5.4.400.0070.04319.26
5.4.390.0000.04318.87
5.4.380.0070.04319.15
5.4.370.0070.04319.21
5.4.360.0030.07719.15
5.4.350.0070.05018.88
5.4.340.0030.05719.14
5.4.320.0030.04318.86
5.4.310.0170.06319.00
5.4.300.0070.04319.00
5.4.290.0030.08019.08
5.4.280.0030.03718.86
5.4.270.0070.04719.22
5.4.260.0000.04019.14
5.4.250.0130.05719.14
5.4.240.0070.06719.11
5.4.230.0000.08018.87
5.4.220.0000.04318.87
5.4.210.0070.03719.24
5.4.200.0000.07719.14
5.4.190.0230.06319.15
5.4.180.0070.05719.20
5.4.170.0070.06718.99
5.4.160.0000.04719.22
5.4.150.0030.07319.23
5.4.140.0070.06016.44
5.4.130.0030.03716.40
5.4.120.0100.07016.36
5.4.110.0070.07316.52
5.4.100.0100.07016.55
5.4.90.0070.04716.52
5.4.80.0030.05316.46
5.4.70.0030.04016.45
5.4.60.0100.07716.28
5.4.50.0070.04716.46
5.4.40.0070.03316.37
5.4.30.0000.04716.39
5.4.20.0130.06716.34
5.4.10.0070.04316.42
5.4.00.0000.04015.82
5.3.290.0030.04014.68
5.3.280.0030.07714.64
5.3.270.0030.06714.77
5.3.260.0130.07014.62
5.3.250.0130.06714.61
5.3.240.0030.06714.62
5.3.230.0100.07314.60
5.3.220.0030.04314.49
5.3.210.0030.07714.71
5.3.200.0070.08014.62
5.3.190.0070.06314.58
5.3.180.0000.08314.49
5.3.170.0130.05714.55
5.3.160.0170.06714.49
5.3.150.0130.06714.56
5.3.140.0030.05314.48
5.3.130.0070.05714.57
5.3.120.0030.08014.47
5.3.110.0030.04714.56
5.3.100.0030.04313.96
5.3.90.0100.05314.02
5.3.80.0100.03314.09
5.3.70.0170.06014.05
5.3.60.0000.05314.04
5.3.50.0070.07313.96
5.3.40.0070.07314.11
5.3.30.0070.06013.97
5.3.20.0000.04713.85
5.3.10.0100.04713.54
5.3.00.0070.05713.64
5.2.170.0000.06311.07
5.2.160.0030.03311.12
5.2.150.0070.04711.22
5.2.140.0130.05711.14
5.2.130.0000.03011.26
5.2.120.0000.03011.10
5.2.110.0070.05711.06
5.2.100.0000.04311.15
5.2.90.0030.04011.02
5.2.80.0100.05711.09
5.2.70.0000.04011.11
5.2.60.0000.04311.05
5.2.50.0000.03311.01
5.2.40.0100.02310.88
5.2.30.0030.04010.98
5.2.20.0170.03310.96
5.2.10.0070.04311.00
5.2.00.0000.05710.72
5.1.60.0070.0479.91
5.1.50.0070.04710.02
5.1.40.0100.0409.95
5.1.30.0030.05710.30
5.1.20.0100.05010.52
5.1.10.0000.06010.12
5.1.00.0030.02710.11
5.0.50.0100.0408.52
5.0.40.0000.0378.41
5.0.30.0030.0378.38
5.0.20.0030.0308.26
5.0.10.0070.0408.12
5.0.00.0070.0638.15
4.4.90.0100.0237.90
4.4.80.0000.0177.90
4.4.70.0000.0237.90
4.4.60.0000.0207.90
4.4.50.0030.0377.90
4.4.40.0100.0337.90
4.4.30.0000.0307.90
4.4.20.0000.0207.90
4.4.10.0000.0177.90
4.4.00.0000.0537.90
4.3.110.0000.0377.90
4.3.100.0000.0337.90
4.3.90.0000.0407.90
4.3.80.0070.0507.90
4.3.70.0070.0237.90
4.3.60.0000.0277.90
4.3.50.0000.0207.90
4.3.40.0030.0307.90
4.3.30.0000.0237.90
4.3.20.0030.0307.90
4.3.10.0030.0237.90
4.3.00.0000.0277.90

preferences:
66.07 ms | 401 KiB | 5 Q