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.0100.00318.30
8.3.50.0200.01221.28
8.3.40.0120.00618.93
8.3.30.0140.00319.21
8.3.20.0000.00720.16
8.3.10.0050.00323.66
8.3.00.0040.00419.38
8.2.180.0120.00416.63
8.2.170.0040.01122.96
8.2.160.0070.00720.39
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0080.00022.23
8.2.110.0060.00320.89
8.2.100.0120.00017.89
8.2.90.0000.00819.21
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00817.91
8.2.50.0040.00418.10
8.2.40.0050.00319.88
8.2.30.0030.00617.98
8.2.20.0040.00417.61
8.2.10.0040.00418.07
8.2.00.0000.00917.75
8.1.280.0040.01125.92
8.1.270.0060.00322.16
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00322.24
8.1.230.0110.00017.77
8.1.220.0090.00017.79
8.1.210.0060.00318.77
8.1.200.0080.00017.35
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0040.00421.93
8.1.150.0040.00418.88
8.1.140.0080.00017.32
8.1.130.0000.00617.75
8.1.120.0000.00717.50
8.1.110.0050.00317.46
8.1.100.0080.00017.46
8.1.90.0070.00017.47
8.1.80.0000.00717.47
8.1.70.0030.00317.37
8.1.60.0060.00317.46
8.1.50.0080.00017.51
8.1.40.0000.00817.53
8.1.30.0040.00417.63
8.1.20.0040.00417.56
8.1.10.0070.00017.57
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0030.00318.36
8.0.270.0040.00317.18
8.0.260.0030.00317.11
8.0.250.0000.00716.94
8.0.240.0000.00716.83
8.0.230.0040.00416.91
8.0.220.0070.00016.78
8.0.210.0060.00016.86
8.0.200.0070.00017.07
8.0.190.0000.00816.96
8.0.180.0070.00017.00
8.0.170.0050.00316.85
8.0.160.0070.00016.95
8.0.150.0000.00716.77
8.0.140.0070.00016.79
8.0.130.0040.00413.35
8.0.120.0060.00316.96
8.0.110.0000.00716.98
8.0.100.0070.00016.99
8.0.90.0000.00717.01
8.0.80.0090.00616.94
8.0.70.0000.00716.74
8.0.60.0080.00017.06
8.0.50.0040.00416.95
8.0.30.0110.00917.01
8.0.20.0120.00817.40
8.0.10.0040.00416.92
8.0.00.0080.01016.67
7.4.330.0000.00615.04
7.4.320.0030.00316.53
7.4.300.0060.00016.48
7.4.290.0040.00416.42
7.4.280.0090.00316.63
7.4.270.0030.00316.42
7.4.260.0070.00016.50
7.4.250.0050.00216.50
7.4.240.0020.00616.58
7.4.230.0030.00316.60
7.4.220.0000.01816.53
7.4.210.0120.01016.55
7.4.200.0030.00516.53
7.4.160.0070.01016.38
7.4.150.0140.00317.40
7.4.140.0130.00617.86
7.4.130.0120.00416.56
7.4.120.0070.01016.51
7.4.110.0090.00916.40
7.4.100.0100.00716.57
7.4.90.0110.00716.62
7.4.80.0070.01019.39
7.4.70.0070.01016.59
7.4.60.0080.00816.39
7.4.50.0060.00316.46
7.4.40.0120.00416.69
7.4.30.0100.00716.46
7.4.00.0070.00714.87
7.3.330.0050.00013.28
7.3.320.0030.00313.29
7.3.310.0000.00716.21
7.3.300.0030.00316.26
7.3.290.0070.00716.36
7.3.280.0080.00816.37
7.3.270.0110.00717.40
7.3.260.0150.00616.48
7.3.250.0070.01316.58
7.3.240.0060.01016.58
7.3.230.0100.00716.58
7.3.210.0130.00316.53
7.3.200.0040.01219.39
7.3.190.0150.00616.46
7.3.180.0090.00916.38
7.3.170.0130.00316.41
7.3.160.0070.01716.55
7.2.330.0150.00316.70
7.2.320.0140.00316.57
7.2.310.0120.00416.54
7.2.300.0000.01616.39
7.2.290.0030.02016.66
7.2.60.0060.01016.65
7.2.00.0090.00619.25
7.1.200.0100.00315.74
7.1.100.0110.00418.03
7.1.70.0150.00617.12
7.1.60.0120.01219.11
7.1.50.0140.01016.93
7.1.00.0030.07022.27
7.0.200.0000.00916.66
7.0.140.0070.07322.10
7.0.60.0070.05019.80
7.0.50.0030.05017.87
7.0.40.0130.07320.19
7.0.30.0270.04020.15
7.0.20.0170.05720.08
7.0.10.0100.03720.09
7.0.00.0030.04320.25
5.6.280.0000.07721.07
5.6.210.0100.04020.48
5.6.200.0070.04018.29
5.6.190.0030.07720.52
5.6.180.0230.04320.61
5.6.170.0270.06720.45
5.6.160.0000.04320.54
5.6.150.0030.08718.25
5.6.140.0070.08318.18
5.6.130.0070.08018.15
5.6.120.0030.09321.04
5.6.110.0130.06721.05
5.6.100.0070.08321.14
5.6.90.0130.05721.04
5.6.80.0100.08020.38
5.5.350.4200.04020.36
5.5.340.0030.03718.10
5.5.330.0000.04720.42
5.5.320.0170.04720.30
5.5.310.0370.05720.27
5.5.300.0130.07317.97
5.5.290.0100.06017.97
5.5.280.0100.08020.66
5.5.270.0200.07320.79
5.5.260.0070.05720.87
5.5.250.0030.08720.62
5.5.240.0170.03320.19
5.4.450.0870.05319.34
5.4.440.0930.06019.34
5.4.430.0700.06019.57
5.4.420.0670.00019.32
5.4.410.0630.00019.31
5.4.400.0630.00019.13
5.4.390.0630.00019.12
5.4.380.0630.00019.16
5.4.370.0630.00018.98
5.4.360.0700.00019.14
5.4.350.0870.00019.11
5.4.340.0110.03012.02
5.4.320.0060.03712.51
5.4.310.0050.03912.51
5.4.300.0080.03512.51
5.4.290.0070.03712.50
5.4.280.0050.03712.40
5.4.270.0030.03912.40
5.4.260.0090.03412.40
5.4.250.0080.03512.40
5.4.240.0070.03512.40
5.4.230.0080.03812.39
5.4.220.0070.03612.39
5.4.210.0080.03312.39
5.4.200.0080.03512.39
5.4.190.0050.03712.39
5.4.180.0070.03412.39
5.4.170.0040.03812.40
5.4.160.0060.03612.39
5.4.150.0050.03712.39
5.4.140.0080.03612.08
5.4.130.0100.03312.06
5.4.120.0080.03412.02
5.4.110.0090.03212.02
5.4.100.0070.03412.02
5.4.90.0040.03912.02
5.4.80.0080.03512.02
5.4.70.0020.03812.02
5.4.60.0080.04012.01
5.4.50.0050.03812.01
5.4.40.0070.03312.00
5.4.30.0040.03712.00
5.4.20.0080.03312.00
5.4.10.0030.03712.00
5.4.00.0040.03711.49
5.3.290.0070.04512.80
5.3.280.0050.03912.71
5.3.270.0080.03712.72
5.3.260.0070.04412.72
5.3.250.0090.03412.72
5.3.240.0060.03712.72
5.3.230.0070.03712.70
5.3.220.0090.03812.68
5.3.210.0070.03812.68
5.3.200.0090.03312.68
5.3.190.0090.03512.68
5.3.180.0030.04012.67
5.3.170.0060.03712.67
5.3.160.0070.03612.67
5.3.150.0040.03912.67
5.3.140.0070.03612.66
5.3.130.0060.04012.65
5.3.120.0080.03712.66
5.3.110.0060.03712.66
5.3.100.0060.03712.12
5.3.90.0080.03412.10
5.3.80.0120.03312.10
5.3.70.0080.03612.10
5.3.60.0030.04112.08
5.3.50.0050.04212.04
5.3.40.0140.04212.04
5.3.30.0080.04111.98
5.3.20.0080.03311.77
5.3.10.0040.03611.75
5.3.00.0050.03811.73
5.2.170.0090.0339.18
5.2.160.0050.0299.18
5.2.150.0040.0319.18
5.2.140.0030.0329.18
5.2.130.0070.0289.14
5.2.120.0020.0319.14
5.2.110.0030.0309.15
5.2.100.0060.0279.14
5.2.90.0040.0309.14
5.2.80.0030.0319.14
5.2.70.0040.0299.14
5.2.60.0040.0299.09
5.2.50.0030.0319.06
5.2.40.0100.0239.03
5.2.30.0070.0279.01
5.2.20.0070.0269.00
5.2.10.0080.0278.93
5.2.00.0060.0288.79
5.1.60.0060.0228.07
5.1.50.0040.0258.06
5.1.40.0030.0268.04
5.1.30.0020.0288.40
5.1.20.0030.0278.42
5.1.10.0050.0258.14
5.1.00.0040.0278.14
5.0.50.0020.0226.62
5.0.40.0030.0196.48
5.0.30.0050.0306.29
5.0.20.0000.0276.27
5.0.10.0120.0206.24
5.0.00.0050.0296.23
4.4.90.0030.0174.78
4.4.80.0030.0194.75
4.4.70.0040.0154.75
4.4.60.0030.0154.76
4.4.50.0030.0154.77
4.4.40.0030.0274.71
4.4.30.0020.0164.76
4.4.20.0020.0164.85
4.4.10.0040.0144.85
4.4.00.0010.0274.76
4.3.110.0050.0134.67
4.3.100.0050.0134.66
4.3.90.0040.0134.64
4.3.80.0020.0254.58
4.3.70.0050.0154.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0010.0264.54
4.3.30.0030.0153.28
4.3.20.0000.0183.26
4.3.10.0030.0153.22
4.3.00.0100.0307.29

preferences:
49.71 ms | 401 KiB | 5 Q