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.0140.00018.31
8.3.50.0260.01121.95
8.3.40.0110.01118.57
8.3.30.0040.01119.15
8.3.20.0040.00420.09
8.3.10.0040.00421.77
8.3.00.0040.00419.25
8.2.180.0030.01016.88
8.2.170.0070.00722.96
8.2.160.0070.01020.47
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.19
8.2.110.0030.00620.49
8.2.100.0080.00417.97
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0030.00619.82
8.2.30.0070.00018.04
8.2.20.0040.00417.60
8.2.10.0050.00318.23
8.2.00.0040.00417.69
8.1.280.0090.00625.92
8.1.270.0030.00521.97
8.1.260.0040.00426.35
8.1.250.0030.00728.09
8.1.240.0030.00623.68
8.1.230.0070.00419.04
8.1.220.0070.00017.74
8.1.210.0000.01018.77
8.1.200.0110.00017.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0080.00018.30
8.1.160.0030.00521.93
8.1.150.0040.00418.76
8.1.140.0000.00817.39
8.1.130.0040.00417.78
8.1.120.0040.00417.46
8.1.110.0000.00817.34
8.1.100.0040.00417.49
8.1.90.0050.00317.36
8.1.80.0030.00617.43
8.1.70.0070.00017.41
8.1.60.0000.00817.48
8.1.50.0040.00417.49
8.1.40.0040.00417.51
8.1.30.0000.00817.52
8.1.20.0060.00317.57
8.1.10.0020.00517.39
8.1.00.0030.00617.25
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.29
8.0.270.0070.00017.23
8.0.260.0030.00317.20
8.0.250.0000.00716.78
8.0.240.0040.00416.88
8.0.230.0000.00716.91
8.0.220.0030.00316.93
8.0.210.0080.00016.88
8.0.200.0070.00016.82
8.0.190.0030.00516.88
8.0.180.0040.00416.89
8.0.170.0000.00816.95
8.0.160.0000.00716.88
8.0.150.0030.00416.79
8.0.140.0000.00716.88
8.0.130.0050.00213.37
8.0.120.0080.00016.82
8.0.110.0000.00716.87
8.0.100.0000.00716.82
8.0.90.0040.00416.93
8.0.80.0180.00316.96
8.0.70.0000.00716.77
8.0.60.0040.00416.86
8.0.50.0000.00816.92
8.0.30.0100.00916.98
8.0.20.0130.01117.40
8.0.10.0100.00016.86
8.0.00.0060.01516.85
7.4.330.0050.00015.02
7.4.320.0000.00716.48
7.4.300.0000.00616.40
7.4.290.0000.00616.57
7.4.280.0080.00416.46
7.4.270.0000.00716.55
7.4.260.0070.00316.58
7.4.250.0090.00016.57
7.4.240.0030.00316.48
7.4.230.0080.00016.35
7.4.220.0100.01716.69
7.4.210.0090.00916.43
7.4.200.0050.00216.39
7.4.160.0130.00316.68
7.4.150.0120.00917.40
7.4.140.0120.00817.86
7.4.130.0070.01116.48
7.4.120.0070.01016.43
7.4.110.0130.00416.52
7.4.100.0040.01516.66
7.4.90.0090.00616.45
7.4.80.0090.00919.39
7.4.70.0070.01016.60
7.4.60.0060.01016.53
7.4.50.0000.00816.34
7.4.40.0130.00316.49
7.4.30.0110.01016.64
7.4.00.0090.00814.86
7.3.330.0050.00013.27
7.3.320.0050.00013.27
7.3.310.0060.00016.41
7.3.300.0070.00016.32
7.3.290.0020.01216.29
7.3.280.0130.00416.32
7.3.270.0120.00617.40
7.3.260.0110.00616.24
7.3.250.0080.01016.55
7.3.240.0140.00416.30
7.3.230.0040.01416.41
7.3.210.0070.00716.23
7.3.200.0150.00619.39
7.3.190.0090.01516.58
7.3.180.0100.00716.38
7.3.170.0060.00916.42
7.3.160.0060.01116.25
7.3.120.0120.00614.80
7.3.110.0120.00614.64
7.3.100.0120.00314.95
7.3.90.0070.00414.84
7.3.80.0100.00315.06
7.3.70.0080.00414.73
7.3.60.0110.00314.93
7.3.50.0090.00014.93
7.3.40.0040.00814.83
7.3.30.0070.00714.48
7.3.20.0070.00316.38
7.3.10.0030.01016.67
7.3.00.0070.00716.68
7.2.330.0190.00316.27
7.2.320.0130.00316.59
7.2.310.0070.01016.31
7.2.300.0090.00716.73
7.2.290.0100.00716.41
7.2.250.0120.00814.72
7.2.240.0100.01015.07
7.2.230.0030.00915.16
7.2.220.0000.01014.98
7.2.210.0040.01514.95
7.2.200.0100.00314.91
7.2.190.0070.01014.94
7.2.180.0030.01214.89
7.2.170.0030.01314.99
7.2.00.0070.00318.89
7.1.330.0040.00815.86
7.1.320.0090.00615.86
7.1.310.0040.00915.71
7.1.300.0060.00315.76
7.1.290.0060.00315.68
7.1.280.0060.00615.72
7.1.270.0030.00915.77
7.1.260.0110.00315.75
7.1.100.0060.00917.86
7.1.70.0040.00417.12
7.1.60.0140.01119.11
7.1.50.0070.01416.73
7.1.00.0070.07322.37
7.0.200.0000.00816.34
7.0.140.0000.07022.18
7.0.60.0100.07719.98
7.0.50.0130.07717.88
7.0.40.0030.08720.15
7.0.30.0270.05020.14
7.0.20.0270.08320.23
7.0.10.0070.04020.19
7.0.00.0030.04320.22
5.6.280.0030.07321.00
5.6.210.0070.07720.49
5.6.200.0070.07718.19
5.6.190.0070.04020.47
5.6.180.0300.04720.52
5.6.170.0230.08020.57
5.6.160.0070.05020.54
5.6.150.0100.05718.16
5.6.140.0070.08318.20
5.6.130.0170.06718.12
5.6.120.0100.08021.01
5.6.110.0170.07721.16
5.6.100.0130.08721.14
5.6.90.0000.09320.99
5.6.80.0070.07320.30
5.5.350.3930.03720.36
5.5.340.0030.05718.01
5.5.330.0130.03020.45
5.5.320.0170.04320.20
5.5.310.0300.07320.24
5.5.300.0100.07317.98
5.5.290.0070.08317.97
5.5.280.0070.04020.90
5.5.270.0130.05020.88
5.5.260.0030.09020.91
5.5.250.0070.04720.63
5.5.240.0170.03720.13
5.4.450.0230.06319.17
5.4.440.1000.05319.48
5.4.430.0930.06319.56
5.4.420.0670.00019.53
5.4.410.0630.00019.43
5.4.400.0630.00018.92
5.4.390.0600.00019.26
5.4.380.0670.00019.27
5.4.370.0630.00019.23
5.4.360.0600.00019.13
5.4.350.0800.00018.98
5.4.340.0030.03612.03
5.4.320.0080.03312.52
5.4.310.0070.03512.51
5.4.300.0070.03412.52
5.4.290.0090.03412.51
5.4.280.0070.04512.41
5.4.270.0050.03712.41
5.4.260.0050.04512.41
5.4.250.0040.03812.41
5.4.240.0050.04312.41
5.4.230.0050.04312.41
5.4.220.0050.04012.40
5.4.210.0050.03712.40
5.4.200.0060.04112.40
5.4.190.0070.03912.40
5.4.180.0060.04012.39
5.4.170.0090.03412.41
5.4.160.0060.04112.41
5.4.150.0050.03612.39
5.4.140.0050.03712.08
5.4.130.0050.03612.07
5.4.120.0060.03412.03
5.4.110.0060.03412.02
5.4.100.0030.04712.03
5.4.90.0060.03712.03
5.4.80.0090.04212.03
5.4.70.0090.03512.02
5.4.60.0020.03812.02
5.4.50.0060.03812.02
5.4.40.0080.03312.01
5.4.30.0050.04012.01
5.4.20.0050.04212.00
5.4.10.0050.03512.00
5.4.00.0060.04211.49
5.3.290.0050.04012.80
5.3.280.0110.03912.71
5.3.270.0050.03912.72
5.3.260.0050.04812.71
5.3.250.0060.04112.72
5.3.240.0090.03712.72
5.3.230.0070.03912.71
5.3.220.0060.04612.68
5.3.210.0060.04412.68
5.3.200.0110.03412.68
5.3.190.0120.03412.68
5.3.180.0100.03512.68
5.3.170.0070.03812.67
5.3.160.0060.03712.67
5.3.150.0080.03412.68
5.3.140.0080.03412.66
5.3.130.0090.03612.66
5.3.120.0120.04412.66
5.3.110.0090.03612.66
5.3.100.0050.03812.14
5.3.90.0080.04112.12
5.3.80.0110.03012.11
5.3.70.0090.04112.11
5.3.60.0080.03412.10
5.3.50.0070.04012.04
5.3.40.0090.03812.04
5.3.30.0090.03412.00
5.3.20.0060.03811.78
5.3.10.0060.03311.75
5.3.00.0050.03811.73
5.2.170.0050.0329.18
5.2.160.0060.0289.18
5.2.150.0060.0389.18
5.2.140.0060.0319.18
5.2.130.0020.0309.14
5.2.120.0040.0289.14
5.2.110.0070.0379.14
5.2.100.0060.0319.14
5.2.90.0040.0309.14
5.2.80.0080.0309.14
5.2.70.0070.0299.14
5.2.60.0040.0319.09
5.2.50.0060.0299.06
5.2.40.0040.0299.03
5.2.30.0060.0289.01
5.2.20.0060.0279.01
5.2.10.0050.0378.92
5.2.00.0060.0358.79
5.1.60.0050.0238.07
5.1.50.0060.0378.06
5.1.40.0050.0238.05
5.1.30.0070.0318.39
5.1.20.0060.0268.41
5.1.10.0090.0288.14
5.1.00.0050.0288.14
5.0.50.0030.0276.62
5.0.40.0070.0166.48
5.0.30.0010.0336.29
5.0.20.0010.0226.27
5.0.10.0050.0246.24
5.0.00.0030.0316.23
4.4.90.0040.0174.78
4.4.80.0020.0184.75
4.4.70.0030.0154.75
4.4.60.0020.0184.75
4.4.50.0040.0144.77
4.4.40.0020.0334.71
4.4.30.0040.0154.76
4.4.20.0040.0214.84
4.4.10.0030.0254.85
4.4.00.0050.0254.76
4.3.110.0030.0174.67
4.3.100.0020.0154.66
4.3.90.0030.0144.63
4.3.80.0030.0234.58
4.3.70.0030.0144.63
4.3.60.0030.0184.63
4.3.50.0020.0184.63
4.3.40.0050.0254.54
4.3.30.0020.0223.29
4.3.20.0040.0183.26
4.3.10.0010.0183.22
4.3.00.0130.0237.29

preferences:
39.43 ms | 401 KiB | 5 Q