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.0110.00418.30
8.3.50.0170.00221.07
8.3.40.0060.01618.71
8.3.30.0070.00718.96
8.3.20.0070.00020.19
8.3.10.0080.00023.63
8.3.00.0040.00419.13
8.2.180.0040.01116.38
8.2.170.0120.00322.96
8.2.160.0150.00020.41
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.01122.17
8.2.110.0050.00520.50
8.2.100.0120.00018.13
8.2.90.0040.00419.18
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0100.00017.55
8.2.50.0040.00418.07
8.2.40.0050.00319.95
8.2.30.0030.00518.05
8.2.20.0040.00417.65
8.2.10.0000.00818.03
8.2.00.0040.00417.71
8.1.280.0100.00325.92
8.1.270.0030.01622.16
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.82
8.1.230.0000.01118.97
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.12
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0050.00318.53
8.1.160.0000.00722.13
8.1.150.0070.00018.94
8.1.140.0060.00317.35
8.1.130.0030.00317.83
8.1.120.0030.00517.48
8.1.110.0000.00817.43
8.1.100.0030.00617.43
8.1.90.0070.00017.50
8.1.80.0030.00517.49
8.1.70.0000.00717.40
8.1.60.0040.00417.61
8.1.50.0000.00817.37
8.1.40.0040.00417.46
8.1.30.0040.00417.65
8.1.20.0030.00617.57
8.1.10.0000.00717.51
8.1.00.0040.00417.23
8.0.300.0060.00318.77
8.0.290.0000.00816.63
8.0.280.0040.00418.32
8.0.270.0000.00717.24
8.0.260.0040.00417.20
8.0.250.0000.00816.95
8.0.240.0030.00516.88
8.0.230.0070.00016.84
8.0.220.0030.00316.84
8.0.210.0030.00316.73
8.0.200.0030.00516.84
8.0.190.0000.00716.98
8.0.180.0040.00416.90
8.0.170.0030.00516.80
8.0.160.0030.00316.89
8.0.150.0000.00716.78
8.0.140.0030.00516.83
8.0.130.0030.00313.32
8.0.120.0000.00716.93
8.0.110.0030.00516.96
8.0.100.0000.00716.74
8.0.90.0000.00716.87
8.0.80.0030.01316.78
8.0.70.0040.00416.82
8.0.60.0000.00716.90
8.0.50.0070.00016.93
8.0.30.0070.01417.05
8.0.20.0120.00717.40
8.0.10.0080.00017.04
8.0.00.0110.01116.73
7.4.330.0050.00015.02
7.4.320.0030.00316.58
7.4.300.0040.00416.61
7.4.290.0030.00416.52
7.4.280.0080.00316.35
7.4.270.0070.00016.50
7.4.260.0050.00216.59
7.4.250.0000.00716.50
7.4.240.0040.00316.53
7.4.230.0070.00016.54
7.4.220.0140.01016.70
7.4.210.0070.01416.56
7.4.200.0000.00716.63
7.4.160.0120.00316.47
7.4.150.0190.00417.40
7.4.140.0110.00817.86
7.4.130.0080.00816.59
7.4.120.0100.00716.51
7.4.110.0070.01016.62
7.4.100.0030.01316.61
7.4.90.0060.01116.31
7.4.80.0000.01819.39
7.4.70.0120.00916.52
7.4.60.0100.00616.44
7.4.50.0040.00416.30
7.4.40.0110.00516.31
7.4.30.0100.01016.41
7.4.00.0110.00814.70
7.3.330.0030.00313.32
7.3.320.0030.00313.28
7.3.310.0050.00216.41
7.3.300.0030.00316.30
7.3.290.0110.00716.37
7.3.280.0050.01316.29
7.3.270.0110.00717.40
7.3.260.0100.00716.53
7.3.250.0080.00916.49
7.3.240.0130.00416.47
7.3.230.0120.00616.39
7.3.210.0060.01016.47
7.3.200.0150.00319.39
7.3.190.0130.00716.58
7.3.180.0120.00616.41
7.3.170.0150.00616.34
7.3.160.0070.01016.61
7.3.120.0100.01014.74
7.3.110.0100.00714.48
7.3.100.0090.00914.94
7.3.90.0000.01715.06
7.3.80.0000.01414.79
7.3.70.0000.00814.66
7.3.60.0100.00714.71
7.3.50.0090.00614.72
7.3.40.0070.00714.49
7.3.30.0090.00614.86
7.3.20.0090.00616.58
7.3.10.0080.00616.57
7.3.00.0030.01216.68
7.2.330.0130.00916.48
7.2.320.0060.01516.36
7.2.310.0130.00316.58
7.2.300.0060.01516.40
7.2.290.0060.00916.66
7.2.250.0070.01415.11
7.2.240.0110.00714.98
7.2.230.0100.00714.81
7.2.220.0000.01114.98
7.2.210.0060.00914.68
7.2.200.0070.01015.07
7.2.190.0030.01314.97
7.2.180.0060.00314.61
7.2.170.0060.00914.81
7.2.130.0110.00016.55
7.2.120.0070.00716.87
7.2.110.0100.00316.83
7.2.100.0030.01016.89
7.2.90.0040.01116.84
7.2.80.0050.00716.71
7.2.70.0060.00916.75
7.2.60.0080.00616.87
7.2.50.0070.00716.91
7.2.40.0110.00016.95
7.2.30.0080.00616.86
7.2.20.0070.01116.16
7.2.10.0070.01116.58
7.2.00.0030.01118.04
7.1.330.0040.00715.45
7.1.320.0000.01015.66
7.1.310.0030.01015.58
7.1.300.0070.00715.75
7.1.290.0060.00915.49
7.1.280.0100.00615.80
7.1.270.0040.00715.66
7.1.260.0060.00615.91
7.1.250.0030.00915.48
7.1.200.0030.01015.86
7.1.100.0060.01018.18
7.1.70.0070.00417.22
7.1.60.0150.00919.11
7.1.50.0060.01916.54
7.1.00.0030.07722.28
7.0.200.0050.00516.60
7.0.140.0000.07321.95
7.0.60.0130.04720.08
7.0.50.0030.06717.73
7.0.40.0030.04020.05
7.0.30.0530.07020.09
7.0.20.0130.04720.23
7.0.10.0370.07320.13
7.0.00.0170.07320.24
5.6.280.0000.07721.11
5.6.210.0200.06720.71
5.6.200.0070.08718.14
5.6.190.0100.05020.57
5.6.180.3230.05020.68
5.6.170.0230.08720.45
5.6.160.0200.07720.44
5.6.150.0070.06018.25
5.6.140.0030.05018.14
5.6.130.0000.04318.14
5.6.120.0030.09021.00
5.6.110.0100.08021.03
5.6.100.0100.06320.98
5.6.90.0070.03720.87
5.6.80.0130.06020.41
5.6.70.4500.03720.29
5.5.350.0300.07720.32
5.5.340.0030.08718.03
5.5.330.0070.08720.35
5.5.320.0230.03720.42
5.5.310.0200.03720.36
5.5.300.0130.07318.07
5.5.290.0130.07317.94
5.5.280.0070.08020.80
5.5.270.0070.05020.89
5.5.260.0130.05720.80
5.5.250.0030.07020.48
5.5.240.0070.05320.08
5.4.450.1700.03319.33
5.4.440.0700.05319.30
5.4.430.0500.06019.21
5.4.420.0630.00019.63
5.4.410.0630.00019.44
5.4.400.0630.00019.27
5.4.390.0630.00019.03
5.4.380.0730.00019.09
5.4.370.0670.00019.11
5.4.360.0670.00019.09
5.4.350.0630.00019.12
5.4.340.0070.03612.03
5.4.320.0100.04412.52
5.4.310.0080.04112.52
5.4.300.0060.03812.52
5.4.290.0070.03912.51
5.4.280.0050.03712.41
5.4.270.0080.03912.41
5.4.260.0070.04312.41
5.4.250.0100.03512.41
5.4.240.0090.04112.41
5.4.230.0090.03512.41
5.4.220.0060.04312.40
5.4.210.0090.03712.40
5.4.200.0100.04212.41
5.4.190.0090.03712.40
5.4.180.0080.03512.40
5.4.170.0070.03512.41
5.4.160.0060.03612.40
5.4.150.0050.03812.40
5.4.140.0060.03812.08
5.4.130.0060.03712.07
5.4.120.0060.03812.03
5.4.110.0110.03212.03
5.4.100.0080.03812.03
5.4.90.0040.04112.03
5.4.80.0100.03812.03
5.4.70.0020.03912.02
5.4.60.0080.03412.02
5.4.50.0080.03212.02
5.4.40.0050.03612.01
5.4.30.0030.03912.01
5.4.20.0030.03812.00
5.4.10.0060.03412.00
5.4.00.0060.03711.49
5.3.290.0110.04012.80
5.3.280.0070.04012.71
5.3.270.0070.04512.72
5.3.260.0070.04112.72
5.3.250.0080.04112.72
5.3.240.0040.04112.72
5.3.230.0060.04312.71
5.3.220.0130.04312.68
5.3.210.0040.04212.68
5.3.200.0090.03712.68
5.3.190.0100.03512.68
5.3.180.0070.03712.68
5.3.170.0090.03512.67
5.3.160.0070.03712.67
5.3.150.0070.03912.68
5.3.140.0050.03612.66
5.3.130.0070.04612.66
5.3.120.0060.04212.66
5.3.110.0060.03912.66
5.3.100.0050.03812.13
5.3.90.0060.03612.12
5.3.80.0090.03512.11
5.3.70.0060.03712.11
5.3.60.0040.04112.09
5.3.50.0060.03812.04
5.3.40.0080.03712.04
5.3.30.0060.03612.00
5.3.20.0060.04511.78
5.3.10.0070.03611.75
5.3.00.0070.03511.74
5.2.170.0110.0259.18
5.2.160.0070.0319.18
5.2.150.0070.0299.18
5.2.140.0040.0319.18
5.2.130.0080.0299.14
5.2.120.0040.0299.14
5.2.110.0030.0309.14
5.2.100.0070.0269.14
5.2.90.0040.0319.14
5.2.80.0040.0329.14
5.2.70.0050.0309.14
5.2.60.0040.0309.09
5.2.50.0070.0279.06
5.2.40.0060.0279.04
5.2.30.0050.0299.02
5.2.20.0050.0289.01
5.2.10.0040.0298.93
5.2.00.0040.0298.79
5.1.60.0070.0248.07
5.1.50.0060.0268.06
5.1.40.0060.0238.05
5.1.30.0050.0308.40
5.1.20.0050.0298.41
5.1.10.0070.0258.14
5.1.00.0020.0288.14
5.0.50.0040.0276.62
5.0.40.0020.0216.48
5.0.30.0040.0306.29
5.0.20.0040.0226.27
5.0.10.0040.0216.24
5.0.00.0050.0326.24
4.4.90.0040.0204.78
4.4.80.0040.0194.75
4.4.70.0040.0194.76
4.4.60.0070.0184.75
4.4.50.0040.0144.77
4.4.40.0050.0244.71
4.4.30.0050.0144.76
4.4.20.0050.0184.84
4.4.10.0020.0174.84
4.4.00.0030.0254.76
4.3.110.0050.0134.67
4.3.100.0010.0184.67
4.3.90.0030.0174.63
4.3.80.0040.0224.58
4.3.70.0030.0144.63
4.3.60.0030.0144.62
4.3.50.0030.0194.63
4.3.40.0040.0224.54
4.3.30.0010.0183.29
4.3.20.0030.0233.26
4.3.10.0030.0183.22
4.3.00.0000.02012.27

preferences:
45.19 ms | 401 KiB | 5 Q