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 echo $one; $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 echo $one + $two; $f3 = function() use ($zero, $one, $two) { $three = 3; // first-level closure scope of f4 echo $zero + $one + $two + $three; $f4 = function() use ($zero, $one, $two, $three) { $four = 4; // local scope of f4 echo $zero + $one + $two + $three + $four; }; $f4(); }; $f3(); }; $f2(); }; $f1(); $f2();

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.01118.68
8.3.50.0070.01221.14
8.3.40.0180.00419.01
8.3.30.0070.00719.21
8.3.20.0070.00020.33
8.3.10.0080.00023.56
8.3.00.0030.00619.26
8.2.180.0100.00316.63
8.2.170.0150.00022.96
8.2.160.0040.01120.51
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0100.00322.23
8.2.110.0090.00320.45
8.2.100.0070.00418.16
8.2.90.0000.00819.10
8.2.80.0040.00417.97
8.2.70.0060.00317.62
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0050.00319.88
8.2.30.0040.00418.07
8.2.20.0040.00417.75
8.2.10.0000.00718.00
8.2.00.0080.00017.68
8.1.280.0030.01325.92
8.1.270.0110.00722.18
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.80
8.1.230.0090.00319.11
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.35
8.1.180.0050.00318.10
8.1.170.0050.00318.66
8.1.160.0030.00622.00
8.1.150.0050.00318.88
8.1.140.0070.00017.46
8.1.130.0030.00317.86
8.1.120.0080.00017.51
8.1.110.0030.00617.39
8.1.100.0050.00317.43
8.1.90.0040.00417.47
8.1.80.0040.00417.41
8.1.70.0070.00017.41
8.1.60.0040.00417.59
8.1.50.0040.00417.45
8.1.40.0040.00417.41
8.1.30.0060.00317.63
8.1.20.0030.00617.70
8.1.10.0000.00717.57
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.38
8.0.270.0070.00017.26
8.0.260.0000.00817.21
8.0.250.0030.00316.98
8.0.240.0060.00016.95
8.0.230.0050.00317.07
8.0.220.0070.00016.85
8.0.210.0030.00316.95
8.0.200.0000.00816.99
8.0.190.0000.00717.01
8.0.180.0050.00217.02
8.0.170.0060.00316.98
8.0.160.0040.00416.92
8.0.150.0030.00316.90
8.0.140.0040.00416.88
8.0.130.0000.00813.36
8.0.120.0000.00716.95
8.0.110.0030.00516.87
8.0.100.0050.00217.00
8.0.90.0020.00516.81
8.0.80.0060.01616.84
8.0.70.0000.00716.81
8.0.60.0000.00816.90
8.0.50.0040.00416.75
8.0.30.0150.00417.07
8.0.20.0100.01117.40
8.0.10.0060.00316.95
8.0.00.0080.01016.76
7.4.330.0020.00215.02
7.4.320.0000.00616.58
7.4.300.0040.00416.55
7.4.290.0040.00416.41
7.4.280.0090.00016.59
7.4.270.0040.00416.57
7.4.260.0000.01016.54
7.4.250.0030.00616.42
7.4.240.0050.00216.63
7.4.230.0040.00416.51
7.4.220.0090.00916.71
7.4.210.0070.00716.61
7.4.200.0030.00516.58
7.4.160.0040.01316.55
7.4.150.0060.01217.40
7.4.140.0150.00717.86
7.4.130.0030.01416.63
7.4.120.0120.00816.61
7.4.110.0080.00816.51
7.4.100.0060.01316.58
7.4.90.0070.01016.50
7.4.80.0100.01019.39
7.4.70.0140.00716.72
7.4.60.0100.00716.41
7.4.50.0040.00416.68
7.4.40.0130.00416.64
7.4.30.0130.00616.43
7.4.00.0080.00815.07
7.3.330.0020.00213.21
7.3.320.0030.00313.24
7.3.310.0030.00316.22
7.3.300.0000.00716.32
7.3.290.0070.00716.39
7.3.280.0100.00816.38
7.3.270.0100.00817.40
7.3.260.0070.01016.40
7.3.250.0120.00516.65
7.3.240.0110.00716.45
7.3.230.0000.01716.39
7.3.210.0080.00816.45
7.3.200.0090.01219.39
7.3.190.0090.01516.47
7.3.180.0150.00016.42
7.3.170.0040.01716.63
7.3.160.0090.00916.54
7.3.120.0050.01114.81
7.3.110.0050.01414.84
7.3.100.0090.00514.80
7.3.90.0120.00314.84
7.3.80.0060.00614.77
7.3.70.0040.00714.82
7.3.60.0080.00714.65
7.3.50.0110.00514.71
7.3.40.0050.00514.97
7.3.30.0030.01014.85
7.3.20.0070.00916.67
7.3.10.0060.01116.62
7.3.00.0080.00716.57
7.2.330.0100.01016.41
7.2.320.0110.00716.74
7.2.310.0130.00516.55
7.2.300.0070.01016.70
7.2.290.0070.01016.41
7.2.250.0030.00814.91
7.2.240.0030.01314.96
7.2.230.0050.00914.93
7.2.220.0070.00915.08
7.2.210.0040.00814.93
7.2.200.0060.00815.01
7.2.190.0090.00515.06
7.2.180.0050.01115.00
7.2.170.0090.00515.04
7.2.160.0040.00915.03
7.2.150.0090.00817.04
7.2.140.0040.01216.94
7.2.130.0110.00516.90
7.2.120.0110.00516.74
7.2.110.0050.00917.04
7.2.100.0090.00616.96
7.2.90.0060.01016.88
7.2.80.0020.01017.06
7.2.70.0090.00316.75
7.2.60.0060.00716.84
7.2.50.0050.00917.09
7.2.40.0050.01116.85
7.2.30.0050.00816.99
7.2.20.0080.00417.03
7.2.10.0050.00917.02
7.2.00.0060.00917.73
7.1.330.0070.01015.66
7.1.320.0040.01015.70
7.1.310.0120.00315.66
7.1.300.0050.01015.68
7.1.290.0020.01315.82
7.1.280.0050.00815.77
7.1.270.0070.00815.61
7.1.260.0070.00515.72
7.1.250.0040.00815.73
7.1.200.0000.01215.77
7.1.100.0060.00618.21
7.1.70.0070.01117.12
7.1.60.0110.01419.11
7.1.50.0320.00734.84
7.1.00.0000.07722.46
7.0.200.0030.00616.62
7.0.140.0100.06721.97
7.0.60.0070.08720.07
7.0.50.0070.06317.89
7.0.40.0030.04020.09
7.0.30.0170.05020.21
7.0.20.0230.04720.07
7.0.10.0300.04720.20
7.0.00.0130.05020.22
5.6.280.0000.07721.11
5.6.210.0130.07020.77
5.6.200.0070.05018.16
5.6.190.0100.08720.34
5.6.180.3070.04020.55
5.6.170.0170.04720.48
5.6.160.0070.04720.54
5.6.150.0130.07318.14
5.6.140.0070.08018.18
5.6.130.0130.03018.20
5.6.120.0100.04321.09
5.6.110.0070.07721.04
5.6.100.0070.07321.11
5.6.90.0000.04320.98
5.6.80.0030.07320.40
5.6.70.4630.02720.42
5.5.350.0300.07320.37
5.5.340.0100.06317.98
5.5.330.0030.09020.31
5.5.320.0300.03320.34
5.5.310.0170.03720.36
5.5.300.0100.04718.07
5.5.290.0030.08317.99
5.5.280.0000.04720.78
5.5.270.0000.07720.80
5.5.260.0130.09020.84
5.5.250.0030.06020.63
5.5.240.0100.08020.28
5.4.450.0500.06719.64
5.4.440.0670.06019.23
5.4.430.0770.06319.61
5.4.420.0670.00019.52
5.4.410.0670.00019.45
5.4.400.0630.00019.03
5.4.390.0630.00019.16
5.4.380.0630.00019.13
5.4.370.0630.00019.02
5.4.360.0630.00019.06
5.4.350.0630.00019.02
5.4.340.0080.03312.03
5.4.320.0060.03712.52
5.4.310.0060.03612.51
5.4.300.0040.03612.52
5.4.290.0060.03712.51
5.4.280.0060.03412.41
5.4.270.0090.03912.41
5.4.260.0050.04012.41
5.4.250.0060.03612.41
5.4.240.0070.03912.41
5.4.230.0080.03812.40
5.4.220.0120.03312.40
5.4.210.0040.03612.40
5.4.200.0090.03812.40
5.4.190.0060.03412.40
5.4.180.0070.03512.40
5.4.170.0100.03312.41
5.4.160.0080.03612.41
5.4.150.0060.03912.40
5.4.140.0050.03812.08
5.4.130.0070.03312.07
5.4.120.0080.04012.03
5.4.110.0060.03812.02
5.4.100.0060.03512.02
5.4.90.0050.03912.03
5.4.80.0050.03812.02
5.4.70.0140.02912.02
5.4.60.0110.03512.02
5.4.50.0040.04212.02
5.4.40.0100.03612.01
5.4.30.0090.03312.00
5.4.20.0020.03912.00
5.4.10.0060.03512.00
5.4.00.0050.03511.50
5.3.290.0110.04112.80
5.3.280.0060.04412.71
5.3.270.0090.04012.72
5.3.260.0060.03912.72
5.3.250.0050.03812.72
5.3.240.0060.03912.72
5.3.230.0040.03912.71
5.3.220.0090.03912.68
5.3.210.0090.03812.68
5.3.200.0060.03912.68
5.3.190.0050.04512.68
5.3.180.0090.03812.68
5.3.170.0040.03912.68
5.3.160.0090.03812.68
5.3.150.0090.03812.68
5.3.140.0060.03512.66
5.3.130.0040.04512.66
5.3.120.0090.03412.66
5.3.110.0080.03612.66
5.3.100.0080.03512.14
5.3.90.0080.03312.13
5.3.80.0070.03712.12
5.3.70.0060.03512.12
5.3.60.0070.03912.10
5.3.50.0080.04412.05
5.3.40.0110.03712.05
5.3.30.0050.04012.02
5.3.20.0060.03811.80
5.3.10.0080.04311.76
5.3.00.0140.03611.74
5.2.170.0030.0429.18
5.2.160.0080.0299.18
5.2.150.0100.0289.18
5.2.140.0040.0379.18
5.2.130.0020.0329.14
5.2.120.0050.0349.14
5.2.110.0030.0329.15
5.2.100.0050.0299.14
5.2.90.0050.0359.14
5.2.80.0070.0309.14
5.2.70.0050.0349.13
5.2.60.0040.0349.09
5.2.50.0030.0329.06
5.2.40.0030.0299.03
5.2.30.0110.0309.01
5.2.20.0040.0389.00
5.2.10.0040.0328.93
5.2.00.0080.0288.78
5.1.60.0050.0248.07
5.1.50.0050.0268.06
5.1.40.0060.0278.05
5.1.30.0050.0298.40
5.1.20.0070.0278.42
5.1.10.0060.0278.14
5.1.00.0080.0258.14
5.0.50.0060.0216.63
5.0.40.0050.0246.48
5.0.30.0020.0346.29
5.0.20.0040.0256.26
5.0.10.0040.0286.25
5.0.00.0060.0386.24
4.4.90.0040.0184.78
4.4.80.0050.0164.75
4.4.70.0050.0164.75
4.4.60.0060.0224.75
4.4.50.0030.0204.77
4.4.40.0000.0314.71
4.4.30.0030.0194.76
4.4.20.0030.0204.85
4.4.10.0060.0224.85
4.4.00.0040.0224.76
4.3.110.0030.0184.67
4.3.100.0020.0224.66
4.3.90.0010.0184.64
4.3.80.0030.0274.58
4.3.70.0030.0184.63
4.3.60.0020.0234.63
4.3.50.0030.0144.63
4.3.40.0020.0234.54
4.3.30.0040.0193.28
4.3.20.0020.0163.26
4.3.10.0010.0183.22
4.3.00.0030.01012.36

preferences:
38.95 ms | 401 KiB | 5 Q