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; $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 var_dump($zero + $one + $two + $three + $four); }; $f4(); }; }; $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.40.0140.00718.76
8.3.30.0140.00019.18
8.3.20.0040.00420.20
8.3.10.0000.00723.57
8.3.00.0040.00419.50
8.2.170.0090.00622.96
8.2.160.0030.01220.35
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0030.00326.16
8.2.120.0070.00722.15
8.2.110.0040.00420.29
8.2.100.0000.01218.09
8.2.90.0080.00019.22
8.2.80.0050.00317.97
8.2.70.0050.00317.38
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0040.00419.89
8.2.30.0050.00317.94
8.2.20.0030.00517.64
8.2.10.0000.00718.12
8.2.00.0000.00917.86
8.1.270.0150.00422.09
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00023.83
8.1.230.0040.00819.16
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0060.00318.64
8.1.160.0000.00821.97
8.1.150.0000.00718.90
8.1.140.0060.00317.37
8.1.130.0030.00317.71
8.1.120.0050.00217.37
8.1.110.0050.00217.44
8.1.100.0050.00317.36
8.1.90.0000.00717.45
8.1.80.0000.00817.46
8.1.70.0070.00017.38
8.1.60.0000.00817.59
8.1.50.0000.00817.45
8.1.40.0040.00417.47
8.1.30.0030.00617.48
8.1.20.0050.00317.65
8.1.10.0050.00217.59
8.1.00.0080.00017.38
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.55
8.0.270.0000.00717.21
8.0.260.0000.00817.31
8.0.250.0000.00717.04
8.0.240.0000.00616.91
8.0.230.0000.00716.88
8.0.220.0080.00016.84
8.0.210.0030.00316.96
8.0.200.0000.00716.91
8.0.190.0000.00817.04
8.0.180.0070.00017.00
8.0.170.0080.00017.00
8.0.160.0040.00416.93
8.0.150.0000.00716.93
8.0.140.0000.00716.89
8.0.130.0000.00613.34
8.0.120.0000.00716.78
8.0.110.0040.00416.88
8.0.100.0040.00416.95
8.0.90.0040.00416.88
8.0.80.0060.00917.00
8.0.70.0070.00016.83
8.0.60.0040.00416.90
8.0.50.0040.00416.84
8.0.30.0120.00716.94
8.0.20.0090.01117.40
8.0.10.0070.00316.95
8.0.00.0080.01316.86
7.4.330.0000.00515.02
7.4.320.0000.00716.41
7.4.300.0000.00616.51
7.4.290.0030.00316.57
7.4.280.0090.00016.49
7.4.270.0000.00716.55
7.4.260.0000.00716.45
7.4.250.0000.00816.57
7.4.240.0040.00416.47
7.4.230.0000.00716.63
7.4.220.0070.01116.38
7.4.210.0110.01116.69
7.4.200.0040.00416.71
7.4.160.0030.01416.61
7.4.150.0170.00817.40
7.4.140.0130.00917.86
7.4.130.0090.00916.48
7.4.120.0140.00316.53
7.4.110.0170.00016.50
7.4.100.0070.01016.60
7.4.90.0110.01216.48
7.4.80.0110.00719.39
7.4.70.0120.00616.52
7.4.60.0060.00916.50
7.4.50.0000.00816.39
7.4.40.0040.01316.28
7.4.30.0150.00716.45
7.4.00.0080.00914.97
7.3.330.0030.00313.32
7.3.320.0030.00213.30
7.3.310.0040.00416.33
7.3.300.0030.00316.35
7.3.290.0070.00716.41
7.3.280.0090.00716.36
7.3.270.0100.01017.40
7.3.260.0040.01416.45
7.3.250.0140.00416.45
7.3.240.0090.00916.68
7.3.230.0100.00716.52
7.3.210.0070.01016.50
7.3.200.0090.01019.39
7.3.190.0100.00716.52
7.3.180.0090.00616.34
7.3.170.0130.00316.30
7.3.160.0130.00716.55
7.3.120.0090.00614.86
7.3.110.0120.00615.02
7.3.100.0090.00614.88
7.3.90.0090.00614.95
7.3.80.0080.00314.63
7.3.70.0060.00814.48
7.3.60.0090.00614.74
7.3.50.0030.00714.92
7.3.40.0090.00614.68
7.3.30.0030.00614.75
7.3.20.0030.01016.52
7.3.10.0070.00716.83
7.3.00.0120.00316.70
7.2.330.0140.00316.64
7.2.320.0080.00816.63
7.2.310.0100.00716.76
7.2.300.0130.00616.68
7.2.290.0070.01016.63
7.2.250.0070.01015.11
7.2.240.0070.01115.06
7.2.230.0060.01215.03
7.2.220.0070.00315.19
7.2.210.0030.01414.95
7.2.200.0040.01415.15
7.2.190.0000.01214.89
7.2.180.0030.01314.89
7.2.170.0040.00715.03
7.2.160.0100.00014.66
7.2.150.0030.00916.85
7.2.140.0080.00316.64
7.2.130.0120.00617.03
7.2.120.0040.00716.98
7.2.110.0000.01016.64
7.2.100.0060.00916.89
7.2.90.0120.00316.67
7.2.80.0100.00717.09
7.2.70.0070.00416.86
7.2.60.0090.00616.73
7.2.50.0060.00617.04
7.2.40.0030.01016.82
7.2.30.0080.00416.67
7.2.20.0000.01216.92
7.2.10.0070.01016.90
7.2.00.0080.00618.10
7.1.330.0000.01615.89
7.1.320.0000.01815.68
7.1.310.0060.00615.55
7.1.300.0070.00715.84
7.1.290.0030.01315.49
7.1.280.0000.01615.76
7.1.270.0080.00615.79
7.1.260.0030.00615.54
7.1.250.0000.00815.78
7.1.240.0030.01015.77
7.1.230.0110.00415.82
7.1.220.0060.00815.74
7.1.210.0000.01315.88
7.1.200.0030.00915.80
7.1.190.0090.00315.47
7.1.180.0110.00015.76
7.1.170.0030.01015.76
7.1.160.0040.01115.63
7.1.150.0080.00415.85
7.1.140.0070.00715.70
7.1.130.0000.01115.78
7.1.120.0080.00415.60
7.1.110.0030.00615.55
7.1.100.0020.01116.90
7.1.90.0000.01215.72
7.1.80.0000.00915.64
7.1.70.0080.00516.33
7.1.60.0080.01217.47
7.1.50.0110.01425.23
7.1.40.0040.01215.78
7.1.30.0080.00415.81
7.1.20.0090.00615.76
7.1.10.0120.00015.83
7.1.00.0030.04419.06
7.0.330.0090.00015.36
7.0.320.0030.01015.33
7.0.310.0030.01215.28
7.0.300.0030.00915.32
7.0.290.0040.01115.33
7.0.280.0090.00315.58
7.0.270.0070.01015.32
7.0.260.0000.01315.32
7.0.250.0130.00015.14
7.0.240.0030.00515.49
7.0.230.0100.00315.41
7.0.220.0070.00715.28
7.0.210.0100.00315.62
7.0.200.0040.00916.08
7.0.190.0060.00615.42
7.0.180.0060.00915.35
7.0.170.0070.00715.02
7.0.160.0030.00715.53
7.0.150.0000.00815.10
7.0.140.0060.03818.66
7.0.130.0040.01115.36
7.0.120.0040.00815.21
7.0.110.0100.00015.26
7.0.100.0000.01315.39
7.0.90.0140.00015.27
7.0.80.0060.00615.45
7.0.70.0000.01815.26
7.0.60.0020.02717.65
7.0.50.0030.02616.67
7.0.40.0070.03216.81
7.0.30.0080.02716.76
7.0.20.0260.03916.76
7.0.10.0020.04216.75
7.0.00.0230.02016.68
5.6.400.0040.01114.30
5.6.390.0040.01114.14
5.6.380.0060.00614.26
5.6.370.0060.00614.66
5.6.360.0040.01414.34
5.6.350.0000.00914.33
5.6.340.0000.01114.25
5.6.330.0050.00514.09
5.6.320.0030.00614.17
5.6.310.0060.00814.03
5.6.300.0090.00614.39
5.6.290.0070.00714.40
5.6.280.0090.03517.59
5.6.270.0030.00714.50
5.6.260.0040.01114.44
5.6.250.0110.00414.26
5.6.240.0040.00814.30
5.6.230.0070.00714.52
5.6.220.0040.01114.19
5.6.210.0130.03817.47
5.6.200.0020.03116.27
5.6.190.0100.04517.47
5.6.180.0210.03717.54
5.6.170.0160.03517.46
5.6.160.0070.04317.31
5.6.150.0050.02616.27
5.6.140.0070.04716.20
5.6.130.0080.02516.25
5.6.120.0030.04817.66
5.6.110.0070.02217.63
5.6.100.0090.04517.78
5.6.90.0030.04617.78
5.6.80.0070.03217.21
5.6.70.0560.03317.26
5.6.60.0030.00714.33
5.6.50.0080.00814.25
5.6.40.0060.00914.07
5.6.30.0050.00514.07
5.6.20.0100.00314.01
5.6.10.0030.01014.34
5.6.00.0040.00814.36
5.5.380.0080.00414.28
5.5.370.0070.00714.07
5.5.360.0080.00414.14
5.5.350.0100.02017.44
5.5.340.0070.02216.31
5.5.330.0080.02817.17
5.5.320.0160.03617.34
5.5.310.0210.03917.44
5.5.300.0060.02716.29
5.5.290.0090.02516.05
5.5.280.0030.02517.70
5.5.270.0050.04917.58
5.5.260.0050.05117.27
5.5.250.0050.04517.27
5.5.240.0190.03517.09
5.5.230.0030.01014.24
5.5.220.0100.00714.13
5.5.210.0120.00314.29
5.5.200.0100.00314.32
5.5.190.0040.00413.95
5.5.180.0100.00714.29
5.5.170.0030.01014.22
5.5.160.0030.00714.39
5.5.150.0000.01514.21
5.5.140.0090.00614.34
5.5.130.0040.01114.32
5.5.120.0000.01114.11
5.5.110.0060.00814.27
5.5.100.0050.00314.40
5.5.90.0000.01114.20
5.5.80.0080.00814.34
5.5.70.0030.00914.31
5.5.60.0000.01514.18
5.5.50.0000.01014.14
5.5.40.0040.01113.85
5.5.30.0000.00814.29
5.5.20.0080.00414.25
5.5.10.0030.01014.21
5.5.00.0070.00714.07
5.4.450.0430.02415.83
5.4.440.0470.03515.86
5.4.430.0530.03315.76
5.4.420.0360.00015.87
5.4.410.0330.00315.71
5.4.400.0360.00115.60
5.4.390.0360.00215.58
5.4.380.0420.00215.68
5.4.370.0370.00015.56
5.4.360.0320.00515.56
5.4.350.0350.00215.58
5.4.340.0080.01812.07
5.4.330.0030.00312.11
5.4.320.0060.02212.31
5.4.310.0070.02012.31
5.4.300.0020.02212.31
5.4.290.0060.02412.31
5.4.280.0040.02012.26
5.4.270.0050.02112.26
5.4.260.0050.01912.26
5.4.250.0030.02512.26
5.4.240.0080.02012.26
5.4.230.0040.02312.26
5.4.220.0050.01812.26
5.4.210.0050.01712.26
5.4.200.0070.02012.26
5.4.190.0080.01912.26
5.4.180.0080.02012.25
5.4.170.0060.02112.26
5.4.160.0050.02212.26
5.4.150.0050.02312.25
5.4.140.0070.02212.10
5.4.130.0010.02312.09
5.4.120.0060.01812.07
5.4.110.0040.02312.06
5.4.100.0040.02112.07
5.4.90.0060.02212.07
5.4.80.0080.02212.07
5.4.70.0080.01812.06
5.4.60.0040.02412.06
5.4.50.0040.02212.06
5.4.40.0020.02612.06
5.4.30.0060.01912.06
5.4.20.0060.02412.06
5.4.10.0050.02312.06
5.4.00.0060.02311.80
5.3.290.0040.04112.80
5.3.280.0080.03812.70
5.3.270.0080.03512.73
5.3.260.0050.04312.71
5.3.250.0060.03612.72
5.3.240.0060.04512.72
5.3.230.0060.04212.71
5.3.220.0100.03412.68
5.3.210.0050.03912.68
5.3.200.0040.03712.68
5.3.190.0060.04212.68
5.3.180.0050.03612.67
5.3.170.0070.03512.67
5.3.160.0040.03712.67
5.3.150.0070.04312.67
5.3.140.0050.03612.66
5.3.130.0100.04212.66
5.3.120.0090.03612.66
5.3.110.0040.04012.66
5.3.100.0100.03212.14
5.3.90.0040.03712.12
5.3.80.0070.04312.12
5.3.70.0050.04212.12
5.3.60.0070.03612.11
5.3.50.0100.03512.04
5.3.40.0040.03712.04
5.3.30.0050.03412.00
5.3.20.0080.03811.79
5.3.10.0050.03511.75
5.3.00.0060.04111.74
5.2.170.0040.0319.18
5.2.160.0050.0369.18
5.2.150.0060.0389.18
5.2.140.0060.0289.18
5.2.130.0060.0319.14
5.2.120.0060.0279.14
5.2.110.0040.0299.15
5.2.100.0060.0289.14
5.2.90.0040.0289.14
5.2.80.0050.0319.14
5.2.70.0040.0389.14
5.2.60.0060.0369.09
5.2.50.0070.0319.06
5.2.40.0030.0379.04
5.2.30.0040.0359.02
5.2.20.0050.0289.00
5.2.10.0090.0308.92
5.2.00.0070.0348.79
5.1.60.0030.0318.07
5.1.50.0060.0238.06
5.1.40.0040.0248.05
5.1.30.0030.0278.40
5.1.20.0050.0258.42
5.1.10.0040.0278.14
5.1.00.0050.0248.14
5.0.50.0050.0186.62
5.0.40.0040.0196.48
5.0.30.0030.0316.29
5.0.20.0060.0216.27
5.0.10.0040.0216.25
5.0.00.0050.0306.23
4.4.90.0000.0184.78
4.4.80.0020.0224.75
4.4.70.0050.0244.75
4.4.60.0030.0214.76
4.4.50.0030.0194.77
4.4.40.0030.0304.71
4.4.30.0030.0164.76
4.4.20.0070.0184.84
4.4.10.0040.0154.85
4.4.00.0040.0244.76
4.3.110.0020.0164.67
4.3.100.0020.0154.66
4.3.90.0010.0164.63
4.3.80.0030.0244.59
4.3.70.0060.0174.63
4.3.60.0040.0124.63
4.3.50.0030.0164.63
4.3.40.0020.0274.54
4.3.30.0010.0173.28
4.3.20.0020.0153.26
4.3.10.0000.0203.22
4.3.00.0200.0237.28

preferences:
60.05 ms | 400 KiB | 5 Q