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 $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(); }; }; };

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.55
8.3.50.0090.00821.91
8.3.40.0070.01118.59
8.3.30.0070.00719.04
8.3.20.0070.00020.34
8.3.10.0080.00023.48
8.3.00.0090.00019.25
8.2.180.0100.00316.50
8.2.170.0040.01122.96
8.2.160.0070.00720.16
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0110.00322.17
8.2.110.0080.00020.29
8.2.100.0070.00718.03
8.2.90.0080.00019.14
8.2.80.0040.00417.97
8.2.70.0000.00817.25
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00319.95
8.2.30.0000.00718.12
8.2.20.0030.00517.64
8.2.10.0000.00818.18
8.2.00.0020.00517.80
8.1.280.0100.01025.92
8.1.270.0110.00722.05
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00624.00
8.1.230.0000.01119.15
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0000.00917.35
8.1.190.0000.00817.13
8.1.180.0030.00518.10
8.1.170.0040.00418.64
8.1.160.0000.00721.95
8.1.150.0050.00218.90
8.1.140.0030.00517.45
8.1.130.0030.00317.78
8.1.120.0030.00417.47
8.1.110.0040.00417.47
8.1.100.0040.00417.29
8.1.90.0040.00417.45
8.1.80.0070.00017.45
8.1.70.0000.00617.39
8.1.60.0030.00617.50
8.1.50.0080.00017.50
8.1.40.0050.00317.40
8.1.30.0060.00317.58
8.1.20.0000.00717.59
8.1.10.0020.00517.51
8.1.00.0040.00417.37
8.0.300.0000.00718.77
8.0.290.0030.00316.58
8.0.280.0030.00318.38
8.0.270.0030.00317.15
8.0.260.0060.00017.20
8.0.250.0050.00216.94
8.0.240.0030.00316.78
8.0.230.0000.00816.95
8.0.220.0030.00316.89
8.0.210.0030.00316.87
8.0.200.0030.00316.88
8.0.190.0030.00516.91
8.0.180.0030.00316.91
8.0.170.0000.00816.91
8.0.160.0070.00016.77
8.0.150.0020.00516.89
8.0.140.0000.00816.85
8.0.130.0000.00713.32
8.0.120.0050.00316.75
8.0.110.0040.00416.81
8.0.100.0050.00216.71
8.0.90.0000.00716.77
8.0.80.0090.00616.86
8.0.70.0040.00416.77
8.0.60.0040.00416.89
8.0.50.0040.00416.78
8.0.30.0090.01417.09
8.0.20.0100.01017.40
8.0.10.0060.00316.87
8.0.00.0130.00716.68
7.4.330.0000.00615.02
7.4.320.0040.00416.37
7.4.300.0000.00616.52
7.4.290.0030.00316.43
7.4.280.0040.00716.61
7.4.270.0030.00316.63
7.4.260.0030.00616.48
7.4.250.0080.00016.57
7.4.240.0020.00516.47
7.4.230.0040.00416.56
7.4.220.0120.00616.61
7.4.210.0060.01116.49
7.4.200.0000.00816.50
7.4.160.0130.00916.45
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0080.01116.50
7.4.120.0070.01216.53
7.4.110.0060.01516.50
7.4.100.0130.00316.48
7.4.90.0140.00316.53
7.4.80.0070.01019.39
7.4.70.0030.01416.42
7.4.60.0140.00316.54
7.4.50.0000.00816.35
7.4.40.0140.00316.31
7.4.30.0120.00516.48
7.4.00.0100.00614.89
7.3.330.0000.00513.17
7.3.320.0000.00513.13
7.3.310.0070.00016.34
7.3.300.0060.00016.18
7.3.290.0090.00416.31
7.3.280.0100.00816.27
7.3.270.0110.00817.40
7.3.260.0040.01316.24
7.3.250.0070.01116.25
7.3.240.0140.00316.37
7.3.230.0110.00516.52
7.3.210.0140.00016.29
7.3.200.0060.01119.39
7.3.190.0110.01116.36
7.3.180.0070.01016.32
7.3.170.0060.00916.27
7.3.160.0060.01216.32
7.3.120.0040.00714.54
7.3.110.0060.01314.92
7.3.100.0070.00714.91
7.3.90.0000.01314.68
7.3.80.0110.00414.52
7.3.70.0090.00014.82
7.3.60.0090.00614.87
7.3.50.0060.00914.89
7.3.40.0060.00614.77
7.3.30.0030.01014.76
7.3.20.0090.00616.39
7.3.10.0090.00616.35
7.3.00.0030.00616.75
7.2.330.0130.00716.63
7.2.320.0060.00916.51
7.2.310.0060.01016.67
7.2.300.0070.01016.55
7.2.290.0130.00616.24
7.2.250.0060.01214.78
7.2.240.0140.00715.03
7.2.230.0080.00814.96
7.2.220.0060.00614.75
7.2.210.0040.01214.81
7.2.200.0100.00714.96
7.2.190.0100.00614.84
7.2.180.0100.00614.84
7.2.170.0090.00914.77
7.2.00.0070.00418.97
7.1.330.0030.00915.50
7.1.320.0000.01615.88
7.1.310.0100.00315.86
7.1.300.0070.01015.79
7.1.290.0090.00315.80
7.1.280.0060.00615.64
7.1.270.0030.01015.88
7.1.260.0030.00715.73
7.1.100.0090.00318.11
7.1.70.0080.00017.13
7.1.60.0110.01419.11
7.1.50.0130.00316.79
7.1.00.0000.07722.35
7.0.200.0000.00916.69
7.0.140.0100.07022.12
7.0.60.0030.04719.95
7.0.50.0100.07317.90
7.0.40.0070.05320.30
7.0.30.0230.05720.10
7.0.20.0230.06320.35
7.0.10.0000.06020.23
7.0.00.0100.07720.14
5.6.210.0100.06720.54
5.6.200.0000.06318.13
5.6.190.0030.04320.63
5.6.180.0400.06320.52
5.6.170.0200.08720.48
5.6.160.0070.09020.48
5.6.150.0070.04718.13
5.6.140.0070.07318.16
5.6.130.0000.04318.24
5.6.120.0130.05721.04
5.6.110.0130.08720.98
5.6.100.0070.03721.14
5.6.90.0130.07321.10
5.6.80.0070.04020.40
5.5.350.0200.06320.41
5.5.340.0100.07718.02
5.5.330.0070.07020.26
5.5.320.0330.06020.36
5.5.310.0330.05020.30
5.5.300.0070.05718.01
5.5.290.0070.03717.98
5.5.280.0030.07020.91
5.5.270.0070.08720.90
5.5.260.0000.04320.78
5.5.250.0070.07720.63
5.5.240.3730.04320.09
5.4.450.0800.05719.44
5.4.440.0700.06319.38
5.4.430.0200.05019.33
5.4.420.0630.00019.57
5.4.410.0630.00019.52
5.4.400.0630.00019.25
5.4.390.0600.00019.13
5.4.380.0670.00019.02
5.4.370.0630.00019.11
5.4.360.0630.00019.13
5.4.350.0630.00019.04
5.4.340.0070.03412.04
5.4.320.0060.03712.52
5.4.310.0100.03412.52
5.4.300.0100.03912.52
5.4.290.0080.04012.52
5.4.280.0070.03412.41
5.4.270.0100.03712.41
5.4.260.0050.03812.41
5.4.250.0080.04112.41
5.4.240.0090.03412.41
5.4.230.0060.03812.40
5.4.220.0090.03212.41
5.4.210.0070.04012.41
5.4.200.0060.03612.41
5.4.190.0060.03512.40
5.4.180.0100.03512.41
5.4.170.0060.03412.41
5.4.160.0050.04112.41
5.4.150.0090.03712.40
5.4.140.0110.03612.08
5.4.130.0050.03912.07
5.4.120.0070.04712.03
5.4.110.0110.03512.02
5.4.100.0040.04212.03
5.4.90.0110.03612.03
5.4.80.0060.04112.03
5.4.70.0090.03512.02
5.4.60.0060.03312.02
5.4.50.0050.03412.03
5.4.40.0100.02912.01
5.4.30.0080.03212.01
5.4.20.0070.03712.01
5.4.10.0040.03612.01
5.4.00.0050.03611.49
5.3.290.0100.03412.80
5.3.280.0070.03612.71
5.3.270.0060.03712.72
5.3.260.0050.03812.72
5.3.250.0050.03712.71
5.3.240.0070.03512.72
5.3.230.0050.03712.71
5.3.220.0040.03812.68
5.3.210.0090.03512.68
5.3.200.0100.03112.68
5.3.190.0050.03712.67
5.3.180.0060.03612.68
5.3.170.0070.03512.67
5.3.160.0080.03412.68
5.3.150.0110.03212.68
5.3.140.0030.03912.66
5.3.130.0070.03612.66
5.3.120.0050.03912.66
5.3.110.0080.03612.65
5.3.100.0080.03512.13
5.3.90.0090.03312.12
5.3.80.0050.03612.11
5.3.70.0070.03512.11
5.3.60.0080.03412.10
5.3.50.0100.03212.04
5.3.40.0040.04612.04
5.3.30.0050.03512.00
5.3.20.0050.03411.78
5.3.10.0110.03511.75
5.3.00.0100.03911.73
5.2.170.0090.0279.18
5.2.160.0050.0349.18
5.2.150.0060.0299.18
5.2.140.0040.0309.18
5.2.130.0060.0279.14
5.2.120.0030.0299.14
5.2.110.0030.0309.15
5.2.100.0050.0279.14
5.2.90.0030.0299.14
5.2.80.0050.0289.14
5.2.70.0040.0309.14
5.2.60.0040.0299.09
5.2.50.0040.0309.06
5.2.40.0030.0309.03
5.2.30.0040.0299.02
5.2.20.0040.0299.00
5.2.10.0070.0248.93
5.2.00.0040.0298.79
5.1.60.0060.0318.07
5.1.50.0030.0268.06
5.1.40.0070.0248.04
5.1.30.0040.0248.40
5.1.20.0050.0328.41
5.1.10.0030.0268.14
5.1.00.0030.0328.14
5.0.50.0060.0236.62
5.0.40.0020.0226.48
5.0.30.0060.0336.30
5.0.20.0030.0286.27
5.0.10.0050.0186.24
5.0.00.0040.0396.23
4.4.90.0020.0174.78
4.4.80.0020.0204.75
4.4.70.0020.0204.76
4.4.60.0030.0184.75
4.4.50.0020.0164.77
4.4.40.0030.0294.71
4.4.30.0010.0184.76
4.4.20.0040.0214.84
4.4.10.0040.0184.85
4.4.00.0030.0304.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0040.0234.59
4.3.70.0010.0164.63
4.3.60.0020.0154.63
4.3.50.0010.0174.63
4.3.40.0020.0254.54
4.3.30.0010.0193.28
4.3.20.0000.0183.26
4.3.10.0030.0153.22
4.3.00.0030.0237.28

preferences:
58.34 ms | 401 KiB | 5 Q