3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zero = 0; // global scope $f1 = function() use ($zero) { $one = 1; // third-level closure scope of f4 $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 $f3 = function() use ($zero, $one, $two) { $three = 3; // first-level closure scope of f4 $f4 = function() use ($zero, $one, $two, $three) { $four = 4; // local scope of f4 echo $zero + $one + $two + $three + $four; }; }; }; }; $f4();

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.0030.01018.43
8.3.50.0140.00721.19
8.3.40.0110.00418.74
8.3.30.0120.00319.22
8.3.20.0030.00620.31
8.3.10.0040.00423.48
8.3.00.0040.00419.38
8.2.180.0000.01416.47
8.2.170.0150.00022.96
8.2.160.0200.00020.53
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00821.92
8.2.110.0070.00321.08
8.2.100.0060.00617.91
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0040.00417.93
8.2.50.0050.00318.10
8.2.40.0000.00819.79
8.2.30.0040.00418.15
8.2.20.0000.00717.76
8.2.10.0070.00018.18
8.2.00.0000.00717.81
8.1.280.0070.00725.92
8.1.270.0000.00922.00
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00919.05
8.1.230.0030.00717.57
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00917.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0040.00421.92
8.1.150.0040.00418.80
8.1.140.0070.00017.40
8.1.130.0070.00017.75
8.1.120.0040.00417.39
8.1.110.0080.00017.45
8.1.100.0030.00517.32
8.1.90.0040.00417.36
8.1.80.0040.00417.45
8.1.70.0000.00717.40
8.1.60.0060.00317.57
8.1.50.0050.00317.55
8.1.40.0030.00617.52
8.1.30.0030.00517.55
8.1.20.0040.00417.64
8.1.10.0090.00017.59
8.1.00.0040.00417.56
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0000.00718.39
8.0.270.0070.00017.25
8.0.260.0000.00717.21
8.0.250.0030.00316.86
8.0.240.0080.00016.85
8.0.230.0030.00316.94
8.0.220.0000.00716.73
8.0.210.0000.00716.89
8.0.200.0070.00016.90
8.0.190.0030.00617.02
8.0.180.0000.00816.88
8.0.170.0040.00416.81
8.0.160.0070.00016.89
8.0.150.0040.00416.85
8.0.140.0040.00416.95
8.0.130.0000.00713.40
8.0.120.0000.00716.76
8.0.110.0000.00816.86
8.0.100.0040.00416.84
8.0.90.0050.00217.03
8.0.80.0130.00316.84
8.0.70.0050.00317.02
8.0.60.0000.00716.77
8.0.50.0000.00716.97
8.0.30.0110.00917.10
8.0.20.0100.00817.40
8.0.10.0000.00816.97
8.0.00.0090.00916.91
7.4.330.0060.00015.14
7.4.320.0030.00316.52
7.4.300.0060.00016.55
7.4.290.0030.00316.60
7.4.280.0000.01016.55
7.4.270.0070.00016.61
7.4.260.0000.00916.49
7.4.250.0040.00416.43
7.4.240.0030.00316.58
7.4.230.0030.00316.59
7.4.220.0030.01416.56
7.4.210.0070.01416.53
7.4.200.0030.00316.44
7.4.160.0060.01116.36
7.4.150.0080.01217.40
7.4.140.0100.01317.86
7.4.130.0060.01116.59
7.4.120.0080.00816.58
7.4.110.0160.01016.54
7.4.100.0080.00816.66
7.4.90.0080.01316.61
7.4.80.0210.00019.39
7.4.70.0030.01316.68
7.4.60.0060.01016.44
7.4.50.0000.00816.34
7.4.40.0130.00316.52
7.4.30.0100.01316.73
7.4.00.0100.00315.13
7.3.330.0050.00013.23
7.3.320.0050.00013.34
7.3.310.0000.00816.42
7.3.300.0020.00516.32
7.3.290.0100.00416.38
7.3.280.0080.00816.33
7.3.270.0110.00917.40
7.3.260.0120.00816.62
7.3.250.0080.01016.46
7.3.240.0100.00716.55
7.3.230.0060.01616.45
7.3.210.0030.01516.56
7.3.200.0060.01219.39
7.3.190.0100.00716.32
7.3.180.0100.00616.36
7.3.170.0110.00616.61
7.3.160.0150.00616.42
7.2.330.0060.01216.69
7.2.320.0090.00916.57
7.2.310.0100.00716.59
7.2.300.0030.01316.60
7.2.290.0150.00716.40
7.2.60.0070.01416.58
7.1.200.0060.00315.73
7.1.100.0040.00418.02
7.1.70.0070.00717.19
7.1.60.0090.01219.11
7.1.50.0230.01334.76
7.1.00.0070.07322.44
7.0.200.0000.00916.40
7.0.140.0030.07722.08
7.0.60.0070.08319.91
7.0.50.0070.04017.87
7.0.40.0100.07320.18
7.0.30.0270.08020.26
7.0.20.0270.08020.34
7.0.10.0000.05320.28
7.0.00.0070.04320.06
5.6.280.0070.07020.92
5.6.210.0100.03720.76
5.6.200.0070.05018.16
5.6.190.0170.04320.58
5.6.180.0300.07320.51
5.6.170.0330.05320.52
5.6.160.0000.04320.55
5.6.150.0100.05718.25
5.6.140.0070.04718.15
5.6.130.0070.08018.27
5.6.120.0100.08020.91
5.6.110.0100.08021.16
5.6.100.0000.06321.00
5.6.90.0000.08320.87
5.6.80.0070.06720.38
5.5.350.4200.04020.44
5.5.340.0000.04017.99
5.5.330.0070.05020.44
5.5.320.0200.07020.24
5.5.310.0430.07020.34
5.5.300.0170.07317.98
5.5.290.0000.04718.06
5.5.280.0100.08320.89
5.5.270.0070.06320.86
5.5.260.0100.04720.76
5.5.250.0130.08020.73
5.5.240.0070.04320.36
5.4.450.0630.07319.17
5.4.440.0500.05019.46
5.4.430.0700.05719.16
5.4.420.0670.00019.52
5.4.410.0670.00019.41
5.4.400.0630.00019.25
5.4.390.0630.00019.13
5.4.380.0630.00019.09
5.4.370.0630.00019.25
5.4.360.0600.00019.16
5.4.350.0630.00019.24
5.4.340.0090.04112.03
5.4.320.0130.03512.52
5.4.310.0070.03812.51
5.4.300.0080.03512.52
5.4.290.0070.04512.52
5.4.280.0080.03512.41
5.4.270.0050.04312.41
5.4.260.0080.04112.41
5.4.250.0070.04112.41
5.4.240.0110.04112.41
5.4.230.0080.03612.40
5.4.220.0070.03512.40
5.4.210.0080.03512.40
5.4.200.0030.04112.40
5.4.190.0070.03612.39
5.4.180.0080.03512.40
5.4.170.0070.03512.40
5.4.160.0040.03712.41
5.4.150.0100.03612.39
5.4.140.0090.05112.08
5.4.130.0080.04012.07
5.4.120.0060.03512.03
5.4.110.0060.03612.02
5.4.100.0080.03812.02
5.4.90.0080.03912.02
5.4.80.0080.03412.02
5.4.70.0040.03612.02
5.4.60.0090.03912.02
5.4.50.0070.04212.02
5.4.40.0050.03412.01
5.4.30.0060.03512.01
5.4.20.0040.03912.00
5.4.10.0080.03412.00
5.4.00.0040.04111.50
5.3.290.0080.03712.80
5.3.280.0110.03512.70
5.3.270.0040.04812.73
5.3.260.0070.03812.72
5.3.250.0030.04012.72
5.3.240.0050.03812.72
5.3.230.0070.03712.71
5.3.220.0080.03712.68
5.3.210.0060.04012.68
5.3.200.0050.03812.68
5.3.190.0080.03612.68
5.3.180.0080.03512.68
5.3.170.0080.03412.67
5.3.160.0040.03812.67
5.3.150.0100.04112.68
5.3.140.0070.03512.66
5.3.130.0070.03812.66
5.3.120.0120.03812.66
5.3.110.0070.03812.66
5.3.100.0040.03812.14
5.3.90.0030.03812.12
5.3.80.0090.03312.12
5.3.70.0070.03512.11
5.3.60.0050.03712.10
5.3.50.0070.03412.04
5.3.40.0030.03912.04
5.3.30.0060.03412.00
5.3.20.0050.03611.78
5.3.10.0060.03611.75
5.3.00.0050.03711.74
5.2.170.0030.0329.18
5.2.160.0050.0279.18
5.2.150.0060.0369.18
5.2.140.0020.0419.18
5.2.130.0050.0309.14
5.2.120.0070.0339.14
5.2.110.0050.0289.15
5.2.100.0090.0379.14
5.2.90.0080.0279.14
5.2.80.0050.0329.14
5.2.70.0060.0319.14
5.2.60.0060.0289.09
5.2.50.0060.0329.06
5.2.40.0050.0309.03
5.2.30.0080.0289.02
5.2.20.0050.0289.00
5.2.10.0090.0308.92
5.2.00.0070.0288.79
5.1.60.0050.0248.07
5.1.50.0060.0308.06
5.1.40.0070.0268.04
5.1.30.0090.0248.40
5.1.20.0060.0258.41
5.1.10.0030.0278.14
5.1.00.0040.0258.14
5.0.50.0030.0226.62
5.0.40.0020.0216.48
5.0.30.0040.0336.29
5.0.20.0060.0216.26
5.0.10.0040.0286.24
5.0.00.0080.0276.23
4.4.90.0030.0174.78
4.4.80.0020.0174.75
4.4.70.0050.0144.76
4.4.60.0050.0164.76
4.4.50.0050.0204.77
4.4.40.0070.0304.70
4.4.30.0040.0144.76
4.4.20.0040.0144.85
4.4.10.0030.0154.85
4.4.00.0040.0254.76
4.3.110.0030.0154.67
4.3.100.0040.0134.67
4.3.90.0020.0174.63
4.3.80.0040.0234.59
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0010.0224.63
4.3.40.0030.0294.54
4.3.30.0010.0163.29
4.3.20.0070.0203.26
4.3.10.0030.0143.22
4.3.00.0000.0237.16

preferences:
40.76 ms | 401 KiB | 5 Q