3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClosure { private $a = 'a'; private $b = 'b'; public function testClosures() { $testClosure = function($var) use ($a, $b) { 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.0040.01518.30
8.3.50.0090.00721.09
8.3.40.0050.01018.97
8.3.30.0070.00718.80
8.3.20.0000.00818.75
8.3.10.0050.00320.66
8.3.00.0070.00021.89
8.2.180.0120.00916.75
8.2.170.0100.01022.96
8.2.160.0040.00920.46
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0070.00317.63
8.2.110.0070.00422.11
8.2.100.0040.00717.69
8.2.90.0000.00819.08
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00417.92
8.2.50.0060.00319.47
8.2.40.0050.00318.05
8.2.30.0030.00519.88
8.2.20.0000.00717.83
8.2.10.0040.00417.69
8.2.00.0040.00417.70
8.1.280.0140.00725.92
8.1.270.0040.00423.99
8.1.260.0120.00626.35
8.1.250.0040.00428.09
8.1.240.0060.01520.68
8.1.230.0040.00720.98
8.1.220.0000.00918.77
8.1.210.0080.00018.96
8.1.200.0050.00517.35
8.1.190.0030.00517.41
8.1.180.0060.00318.10
8.1.170.0080.00018.52
8.1.160.0000.00718.86
8.1.150.0040.00418.68
8.1.140.0040.00417.42
8.1.130.0030.00317.72
8.1.120.0070.00017.50
8.1.110.0040.00417.44
8.1.100.0040.00417.46
8.1.90.0050.00217.46
8.1.80.0030.00417.45
8.1.70.0030.00317.39
8.1.60.0040.00417.57
8.1.50.0030.00617.46
8.1.40.0000.00717.50
8.1.30.0040.00417.54
8.1.20.0040.00417.58
8.1.10.0030.00617.55
8.1.00.0000.00917.53
8.0.300.0070.00019.98
8.0.290.0040.00416.75
8.0.280.0070.00018.45
8.0.270.0070.00017.17
8.0.260.0000.00716.89
8.0.250.0070.00016.92
8.0.240.0060.00317.06
8.0.230.0070.00016.91
8.0.220.0000.00716.89
8.0.210.0030.00317.00
8.0.200.0030.00316.98
8.0.190.0030.00317.06
8.0.180.0030.00316.91
8.0.170.0000.00716.86
8.0.160.0000.00816.96
8.0.150.0050.00216.92
8.0.140.0000.00816.90
8.0.130.0080.00013.43
8.0.120.0030.00616.83
8.0.110.0090.00016.80
8.0.100.0000.00716.78
8.0.90.0040.00416.95
8.0.80.0090.00616.92
8.0.70.0000.00716.74
8.0.60.0000.00816.81
8.0.50.0040.00416.82
8.0.30.0030.01517.17
8.0.20.0120.00617.40
8.0.10.0000.00716.97
8.0.00.0080.01116.83
7.4.330.0000.00614.82
7.4.320.0070.00016.43
7.4.300.0060.00016.57
7.4.290.0000.00716.37
7.4.280.0030.00416.60
7.4.270.0000.00616.59
7.4.260.0030.00313.35
7.4.250.0080.00016.38
7.4.240.0000.00716.53
7.4.230.0040.00416.63
7.4.220.0050.01216.57
7.4.210.0080.00916.67
7.4.200.0000.00716.25
7.4.190.0000.00716.61
7.4.160.0150.00416.55
7.4.150.0110.01117.40
7.4.140.0110.00717.86
7.4.130.0030.01516.58
7.4.120.0140.00916.52
7.4.110.0120.00616.44
7.4.100.0030.01316.54
7.4.90.0120.00916.57
7.4.80.0100.00719.37
7.4.70.0060.01116.54
7.4.60.0080.00816.35
7.4.50.0040.00416.42
7.4.40.0080.00722.27
7.4.30.0040.01416.74
7.4.00.0070.00415.12
7.3.330.0000.00513.12
7.3.320.0000.00513.32
7.3.310.0000.00716.39
7.3.300.0060.00016.33
7.3.290.0070.01016.37
7.3.280.0100.00516.33
7.3.270.0060.01217.40
7.3.260.0170.00218.24
7.3.250.0110.00916.55
7.3.240.0060.01316.54
7.3.230.0110.00616.57
7.3.210.0170.00016.57
7.3.200.0090.01219.39
7.3.190.0070.01016.52
7.3.180.0120.00316.58
7.3.170.0120.00916.54
7.3.160.0120.00316.65
7.3.120.0100.00714.88
7.3.10.0080.00916.34
7.3.00.0110.01216.24
7.2.330.0110.00716.89
7.2.320.0140.00316.51
7.2.310.0090.01516.77
7.2.300.0060.01216.53
7.2.290.0060.01016.83
7.2.130.0050.01016.70
7.2.120.0060.01116.57
7.2.110.0140.00316.53
7.2.100.0230.00716.50
7.2.90.0280.00716.71
7.2.80.0240.00616.59
7.2.70.0120.01016.30
7.2.60.0260.00816.88
7.2.50.0150.01116.88
7.2.40.0230.00616.82
7.2.30.0210.00916.79
7.2.20.0200.00716.85
7.2.10.0130.01516.88
7.2.00.0110.00917.66
7.1.250.0070.01115.16
7.1.240.0090.00615.84
7.1.230.0100.01415.56
7.1.220.0120.00015.75
7.1.210.0270.00415.46
7.1.200.0550.00715.61
7.1.190.0220.01315.66
7.1.180.0500.00415.54
7.1.170.0210.00815.72
7.1.160.0360.00415.79
7.1.150.0250.00615.61
7.1.140.0480.00915.86
7.1.130.0330.01115.80
7.1.120.0310.00615.79
7.1.110.0350.01415.64
7.1.100.0200.00816.84
7.1.90.0180.01315.71
7.1.80.0290.00715.85
7.1.70.0170.00616.65
7.1.60.0150.01117.62
7.1.50.0160.01416.33
7.1.40.0190.00415.55
7.1.30.0170.01015.55
7.1.20.0450.00715.77
7.1.10.0390.01015.82
7.1.00.0160.02819.16
7.0.330.0120.00315.26
7.0.320.0090.00615.54
7.0.310.0170.00415.13
7.0.300.0090.01215.40
7.0.290.0110.01115.38
7.0.280.0370.01115.42
7.0.270.0500.00015.38
7.0.260.0400.00715.43
7.0.250.0310.00415.59
7.0.240.0470.00715.16
7.0.230.0340.01215.18
7.0.220.0260.00015.23
7.0.210.0340.00415.10
7.0.200.0160.01315.16
7.0.190.0230.00815.36
7.0.180.0490.00315.30
7.0.170.0380.01115.62
7.0.160.0340.00815.43
7.0.150.0520.00015.45
7.0.140.0080.04418.59
7.0.130.0420.00615.34
7.0.120.0310.00615.23
7.0.110.0260.01515.00
7.0.100.0350.00315.45
7.0.90.0260.00615.13
7.0.80.0200.01015.26
7.0.70.0240.00815.05
7.0.60.0150.04117.75
7.0.50.0190.03716.67
7.0.40.0270.02616.62
7.0.30.0160.04616.83
7.0.20.0240.04516.87
7.0.10.0160.02816.87
7.0.00.0270.03316.90
5.6.380.0200.00314.46
5.6.370.0210.00914.00
5.6.360.0000.01414.29
5.6.350.0060.01214.18
5.6.340.0130.01014.45
5.6.330.0190.00714.44
5.6.320.0190.00314.30
5.6.310.0130.01014.34
5.6.300.0160.00314.11
5.6.290.0130.01014.26
5.6.280.0050.04317.62
5.6.270.0140.01414.19
5.6.260.0030.01013.86
5.6.250.0170.01014.30
5.6.240.0230.00314.15
5.6.230.0160.00314.49
5.6.220.0250.00314.27
5.6.210.0050.02517.39
5.6.200.0020.04916.24
5.6.190.0100.02317.55
5.6.180.0260.03717.47
5.6.170.0300.04217.27
5.6.160.0090.05017.42
5.6.150.0070.04316.25
5.6.140.0080.02316.18
5.6.130.0060.03316.15
5.6.120.0040.02317.60
5.6.110.0080.02617.64
5.6.100.0130.03817.61
5.6.90.0110.03717.53
5.6.80.0090.04017.37
5.6.70.0000.00913.83
5.6.60.0000.01414.09
5.6.50.0090.00014.10
5.6.40.0100.00314.13
5.6.30.0070.01414.08
5.6.20.0210.00014.31
5.6.10.0130.00314.04
5.6.00.0160.00314.47
5.5.380.0000.01211.14
5.5.370.0090.00911.09
5.5.360.0030.01010.81
5.5.350.1210.01715.68
5.5.340.0050.04014.77
5.5.330.0020.02715.70
5.5.320.0190.04315.70
5.5.310.0170.04015.73
5.5.300.0060.04114.57
5.5.290.0060.03614.51
5.5.280.0030.03015.93
5.5.270.0050.02216.05
5.5.260.0080.02315.68
5.5.250.0120.03815.77
5.5.240.0060.04515.69
5.5.230.0070.00310.87
5.5.220.0030.00610.73
5.5.210.0040.00810.88
5.5.200.0030.00710.93
5.5.190.0100.00311.15
5.5.180.0070.00310.86
5.5.170.0000.00611.08
5.5.160.0050.00711.16
5.5.150.0050.00310.57
5.5.140.0130.00011.14
5.5.130.0000.00810.95
5.5.120.0080.00410.73
5.5.110.0130.00311.20
5.5.100.0030.00710.97
5.5.90.0030.00710.89
5.5.80.0000.00610.69
5.5.70.0040.00810.70
5.5.60.0040.00811.04
5.5.50.0150.00010.77
5.5.40.0000.00611.16
5.5.30.0030.00611.04
5.5.20.0080.00010.67
5.5.10.0070.00010.83
5.5.00.0090.00311.00
5.4.450.1540.02215.09
5.4.440.1420.02415.08
5.4.430.1520.02215.14
5.4.420.1530.01815.29
5.4.410.1410.01814.96
5.4.400.1480.02415.08
5.4.390.1530.01815.12
5.4.380.1420.02015.19
5.4.370.1410.01815.13
5.4.360.1500.02014.92
5.4.350.1530.02014.87
5.4.340.1530.02215.08
5.4.330.0070.01110.80
5.4.320.1190.01815.08
5.4.310.1320.02514.95
5.4.300.1300.02414.90
5.4.290.1430.01814.95
5.4.280.1510.02314.86
5.4.270.1550.02014.97
5.4.260.1630.02015.15
5.4.250.1640.02014.97
5.4.240.1610.02314.85
5.4.230.1670.01915.17
5.4.220.1650.02015.10
5.4.210.1680.02014.86
5.4.200.1630.02015.05
5.4.190.1520.02015.14
5.4.180.1680.02015.14
5.4.170.1550.02214.91
5.4.160.1730.02515.11
5.4.150.1660.02115.10
5.4.140.1620.02513.74
5.4.130.1680.01813.78
5.4.120.1700.02413.86
5.4.110.1710.01713.77
5.4.100.1540.01713.58
5.4.90.1600.01713.73
5.4.80.1580.01713.61
5.4.70.1590.01713.55
5.4.60.1640.02013.77
5.4.50.1580.02013.59
5.4.40.1670.01813.53
5.4.30.1680.02013.65
5.4.20.1350.01813.63
5.4.10.1700.01513.40
5.4.00.1420.01713.41
5.3.290.1450.02612.63
5.3.280.1510.02012.56
5.3.270.1630.02012.63
5.3.260.1400.01812.54
5.3.250.1930.01512.50
5.3.240.1950.01812.54
5.3.230.1480.02212.65
5.3.220.1620.02012.49
5.3.210.1540.02012.44
5.3.200.1620.02612.58
5.3.190.1710.02412.41
5.3.180.1580.02012.58
5.3.170.1680.01812.67
5.3.160.1520.02212.57
5.3.150.1640.02012.61
5.3.140.1530.02312.64
5.3.130.1520.02012.55
5.3.120.1650.02312.65
5.3.110.1560.01712.56
5.3.100.1650.02312.18
5.3.90.1550.02112.35
5.3.80.1650.02112.29
5.3.70.1590.01712.26
5.3.60.1660.02112.26
5.3.50.1800.01912.27
5.3.40.1450.01312.29
5.3.30.1530.01712.22
5.3.20.1640.02012.02
5.3.10.1690.01811.98
5.3.00.1680.01711.94
5.2.170.1250.01810.27
5.2.160.1180.02010.27
5.2.150.1360.01310.27
5.2.140.1390.01610.32
5.2.130.1380.01510.27
5.2.120.1270.01710.31
5.2.110.1400.01510.27
5.2.100.1640.01810.27
5.2.90.1600.01810.31
5.2.80.1360.01510.27
5.2.70.1150.01510.27
5.2.60.1270.01710.27
5.2.50.1320.01710.27
5.2.40.1070.01310.29
5.2.30.1150.01710.27
5.2.20.1130.01610.27
5.2.10.1010.01410.27
5.2.00.1170.01510.27
5.1.60.0980.01810.27
5.1.50.1150.01210.27
5.1.40.1100.01610.27
5.1.30.1030.01710.27
5.1.20.1020.01510.27
5.1.10.1000.01510.27
5.1.00.1200.01310.27
5.0.50.0640.01010.27
5.0.40.0700.00810.27
5.0.30.0750.02210.27
5.0.20.0600.01110.27
5.0.10.0500.01510.27
5.0.00.0580.02410.27
4.4.90.0430.01110.27
4.4.80.0540.00810.27
4.4.70.0600.01210.27
4.4.60.0670.01110.27
4.4.50.0560.01010.27
4.4.40.0640.01810.27
4.4.30.0670.01210.27
4.4.20.0560.00810.27
4.4.10.0580.00910.27
4.4.00.0650.01710.27
4.3.110.0500.01010.27
4.3.100.0690.00810.27
4.3.90.0520.00910.27
4.3.80.0530.01310.27
4.3.70.0520.00810.27
4.3.60.0600.00810.27
4.3.50.0530.00810.27
4.3.40.0570.01510.27
4.3.30.0300.01310.27
4.3.20.0330.01210.27
4.3.10.0250.01010.27
4.3.00.0280.00610.27

preferences:
50.63 ms | 401 KiB | 5 Q