3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen($a) { $closure = function () use ($a) { return $a; }; $a++; return $closure; } $closure = gen(42); echo $closure, "\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.40.0140.00718.71
8.3.30.0070.00718.79
8.3.20.0080.00020.34
8.3.10.0000.00721.73
8.3.00.0060.00319.59
8.2.170.0070.00722.96
8.2.160.0070.00720.46
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00317.50
8.2.110.0090.00019.31
8.2.100.0070.00418.03
8.2.90.0000.00819.21
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0090.00017.91
8.2.50.0030.00719.35
8.2.40.0040.00421.02
8.2.30.0000.00819.83
8.2.20.0050.00317.67
8.2.10.0000.00817.96
8.2.00.0040.00418.12
8.1.270.0080.00020.13
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0090.00023.80
8.1.230.0060.00617.42
8.1.220.0050.00317.74
8.1.210.0050.00518.77
8.1.200.0060.00317.25
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0050.00318.64
8.1.160.0050.00322.05
8.1.150.0050.00218.76
8.1.140.0030.00617.45
8.1.130.0030.00317.61
8.1.120.0040.00417.51
8.1.110.0000.00817.35
8.1.100.0050.00317.45
8.1.90.0060.00317.36
8.1.80.0040.00417.45
8.1.70.0000.00717.36
8.1.60.0080.00017.55
8.1.50.0000.00817.45
8.1.40.0050.00317.33
8.1.30.0060.00317.56
8.1.20.0000.00717.64
8.1.10.0000.00817.64
8.1.00.0040.00817.43
8.0.300.0050.00318.77
8.0.290.0000.00816.75
8.0.280.0070.00018.35
8.0.270.0040.00417.29
8.0.260.0040.00417.25
8.0.250.0030.00316.96
8.0.240.0020.00517.02
8.0.230.0070.00017.00
8.0.220.0030.00316.84
8.0.210.0040.00416.89
8.0.200.0060.00016.98
8.0.190.0080.00016.89
8.0.180.0040.00416.96
8.0.170.0030.00517.02
8.0.160.0000.00716.94
8.0.150.0000.00816.90
8.0.140.0000.00716.91
8.0.130.0070.00213.33
8.0.120.0040.00416.86
8.0.110.0050.00216.88
8.0.100.0000.00716.88
8.0.90.0050.00317.01
8.0.80.0070.01116.93
8.0.70.0000.00816.91
8.0.60.0030.00516.84
8.0.50.0040.00416.98
8.0.30.0070.01016.99
8.0.20.0050.01417.40
8.0.10.0000.00717.02
8.0.00.0130.00516.79
7.4.330.0030.00315.08
7.4.320.0040.00416.48
7.4.300.0000.00616.40
7.4.290.0000.00816.54
7.4.280.0040.00416.54
7.4.270.0030.00316.59
7.4.260.0030.00316.52
7.4.250.0000.00716.51
7.4.240.0020.00516.57
7.4.230.0030.00316.68
7.4.220.0080.01616.54
7.4.210.0100.00516.59
7.4.200.0000.00716.33
7.4.160.0030.01316.66
7.4.150.0070.01117.40
7.4.140.0130.00817.86
7.4.130.0090.01116.46
7.4.120.0110.00516.54
7.4.110.0120.00616.47
7.4.100.0130.00316.61
7.4.90.0120.00616.35
7.4.80.0100.00619.39
7.4.70.0080.00816.41
7.4.60.0120.00416.64
7.4.50.0040.00416.38
7.4.40.0100.00716.43
7.4.30.0070.01516.32
7.4.00.0030.00914.75
7.3.330.0020.00213.33
7.3.320.0000.00513.34
7.3.310.0030.00316.29
7.3.300.0000.00616.22
7.3.290.0000.00616.36
7.3.280.0100.00916.36
7.3.270.0150.00317.40
7.3.260.0130.00916.26
7.3.250.0110.00916.51
7.3.240.0070.01116.64
7.3.230.0040.01516.43
7.3.210.0070.01016.64
7.3.200.0080.00919.39
7.3.190.0090.00916.64
7.3.180.0140.00716.42
7.3.170.0040.01316.50
7.3.160.0030.01316.67
7.3.10.0100.01016.53
7.3.00.0150.00616.63
7.2.330.0090.01216.86
7.2.320.0070.01016.82
7.2.310.0030.01216.73
7.2.300.0130.00716.33
7.2.290.0060.01116.75
7.2.130.0110.00816.72
7.2.120.0070.01116.95
7.2.110.0090.00317.11
7.2.100.0160.00316.93
7.2.90.0070.01016.91
7.2.80.0110.00416.80
7.2.70.0100.00716.94
7.2.60.0100.00816.75
7.2.50.0030.01016.96
7.2.40.0120.00317.10
7.2.30.0120.00616.74
7.2.20.0160.00716.79
7.2.10.0040.01816.71
7.2.00.0080.01118.14
7.1.250.0110.00815.61
7.1.200.0060.00315.84
7.1.100.0060.00617.97
7.1.70.0000.01016.80
7.1.60.0040.00820.03
7.1.50.0120.00916.61
7.1.00.0000.08022.45
7.0.200.1090.00314.36
7.0.60.0070.08019.78
7.0.50.0100.06317.83
7.0.40.0030.06020.40
7.0.30.0270.07320.09
7.0.20.0270.03320.30
7.0.10.0170.06320.17
7.0.00.0030.08020.22
5.6.280.0030.06321.02
5.6.210.0100.03720.71
5.6.200.0170.07718.29
5.6.190.0030.05720.48
5.6.180.3430.04020.42
5.6.170.0270.04320.46
5.6.160.0000.04720.71
5.6.150.0130.07018.12
5.6.140.0070.04318.18
5.6.130.0070.09018.18
5.6.120.0070.08321.00
5.6.110.0130.06021.02
5.6.100.0070.07321.11
5.6.90.0100.06320.98
5.6.80.0130.07320.39
5.6.70.4470.04320.36
5.5.350.0370.07020.41
5.5.340.0070.06717.94
5.5.330.0100.07320.41
5.5.320.3130.04020.26
5.5.310.0300.08020.21
5.5.300.0100.03318.03
5.5.290.0030.07717.97
5.5.280.0070.04020.95
5.5.270.0070.07320.86
5.5.260.0030.05720.87
5.5.250.0070.03720.59
5.5.240.0270.07720.27
5.4.450.0370.06319.62
5.4.440.0600.07319.31
5.4.430.0500.05719.29
5.4.420.0500.04719.31
5.4.410.0470.05019.45
5.4.400.0500.04319.15
5.4.390.0530.04318.82
5.4.380.0370.05719.29
5.4.370.0600.04718.82
5.4.360.0600.05019.29
5.4.350.0570.04718.82
5.4.340.0670.03718.97
5.4.320.0470.05719.17
5.4.310.0470.05318.73
5.4.300.0430.06019.01
5.4.290.0530.05018.96
5.4.280.0470.07719.28
5.4.270.0470.05719.00
5.4.260.0500.05318.91
5.4.250.0530.05018.95
5.4.240.0630.04019.14
5.4.230.0700.06319.24
5.4.220.0500.05718.91
5.4.210.0570.04719.36
5.4.200.0500.05019.28
5.4.190.0470.04318.96
5.4.180.0400.05319.23
5.4.170.0430.05019.14
5.4.160.0430.04719.22
5.4.150.0470.04718.99
5.4.140.0430.04716.59
5.4.130.0400.04716.46
5.4.120.0530.04316.62
5.4.110.0430.05016.67
5.4.100.0330.05716.65
5.4.90.0430.04716.46
5.4.80.0430.04716.57
5.4.70.0030.06316.57
5.4.60.0300.06716.25
5.4.50.0030.04316.52
5.4.40.0200.04716.38
5.4.30.0370.05716.16
5.4.20.0130.05016.51

preferences:
54.88 ms | 400 KiB | 5 Q