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

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.0070.00718.43
8.3.50.0200.01021.95
8.3.40.0120.00918.99
8.3.30.0070.00719.27
8.3.20.0040.00420.29
8.3.10.0050.00323.56
8.3.00.0040.00419.26
8.2.180.0070.00716.38
8.2.170.0070.00722.96
8.2.160.0120.00620.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.01122.09
8.2.110.0060.00320.37
8.2.100.0100.00317.87
8.2.90.0000.00819.05
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0040.00419.75
8.2.30.0040.00417.95
8.2.20.0040.00417.56
8.2.10.0040.00418.24
8.2.00.0000.00717.85
8.1.280.0140.00025.92
8.1.270.0090.00022.19
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0030.00623.97
8.1.230.0110.00019.08
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0000.01117.13
8.1.190.0040.00417.23
8.1.180.0050.00218.10
8.1.170.0060.00318.51
8.1.160.0070.00022.01
8.1.150.0040.00418.89
8.1.140.0040.00417.44
8.1.130.0070.00017.73
8.1.120.0070.00017.36
8.1.110.0050.00317.45
8.1.100.0040.00417.45
8.1.90.0000.00717.46
8.1.80.0030.00317.48
8.1.70.0000.00717.43
8.1.60.0030.00517.61
8.1.50.0040.00417.57
8.1.40.0080.00017.50
8.1.30.0030.00517.66
8.1.20.0040.00417.67
8.1.10.0040.00417.48
8.1.00.0050.00317.44
8.0.300.0080.00018.77
8.0.290.0030.00316.75
8.0.280.0030.00318.45
8.0.270.0000.00817.34
8.0.260.0000.00617.13
8.0.250.0030.00316.95
8.0.240.0030.00316.95
8.0.230.0030.00316.96
8.0.220.0030.00316.88
8.0.210.0060.00016.78
8.0.200.0050.00216.96
8.0.190.0060.00316.94
8.0.180.0070.00016.81
8.0.170.0040.00416.81
8.0.160.0040.00416.91
8.0.150.0040.00416.81
8.0.140.0000.00816.85
8.0.130.0050.00313.32
8.0.120.0030.00516.93
8.0.110.0050.00216.80
8.0.100.0070.00016.78
8.0.90.0000.00716.88
8.0.80.0090.00616.89
8.0.70.0050.00316.91
8.0.60.0050.00216.71
8.0.50.0050.00216.73
8.0.30.0120.00917.05
8.0.20.0110.01017.40
8.0.10.0030.00616.99
8.0.00.0080.01116.98
7.4.330.0000.00515.02
7.4.320.0000.00616.40
7.4.300.0060.00016.52
7.4.290.0000.00716.60
7.4.280.0090.00016.50
7.4.270.0030.00316.54
7.4.260.0030.00316.61
7.4.250.0000.00816.51
7.4.240.0020.00516.52
7.4.230.0030.00516.69
7.4.220.0070.01116.47
7.4.210.0120.00916.71
7.4.200.0030.00516.60
7.4.160.0170.00016.66
7.4.150.0040.01417.40
7.4.140.0110.01217.86
7.4.130.0070.01016.66
7.4.120.0080.00916.47
7.4.110.0130.00416.57
7.4.100.0060.01016.34
7.4.90.0150.00716.38
7.4.80.0120.00619.39
7.4.70.0100.00716.55
7.4.60.0150.00916.56
7.4.50.0000.00816.64
7.4.40.0070.01416.52
7.4.30.0100.00716.51
7.4.00.0110.00714.81
7.3.330.0050.00013.29
7.3.320.0050.00013.32
7.3.310.0000.00716.20
7.3.300.0040.00416.27
7.3.290.0080.00716.30
7.3.280.0100.00616.31
7.3.270.0150.00417.40
7.3.260.0030.01616.54
7.3.250.0120.00616.29
7.3.240.0160.00716.29
7.3.230.0110.00516.39
7.3.210.0040.01116.57
7.3.200.0090.00919.39
7.3.190.0070.01016.60
7.3.180.0040.01316.51
7.3.170.0100.01016.35
7.3.160.0150.00416.31
7.2.330.0090.00916.34
7.2.320.0080.00816.70
7.2.310.0060.00916.54
7.2.300.0170.00016.50
7.2.290.0060.01216.28
7.2.00.0030.00919.07
7.1.100.0080.00618.18
7.1.70.0040.00417.06
7.1.60.0030.02019.11
7.1.50.0040.01216.88
7.1.00.0100.07022.51
7.0.200.0000.00816.66
7.0.140.0100.07022.09
7.0.60.0130.08019.91
7.0.50.0100.06017.89
7.0.40.0170.07320.14
7.0.30.0330.06720.26
7.0.20.0230.04720.21
7.0.10.0170.04320.19
7.0.00.0130.06020.23
5.6.280.0030.07321.11
5.6.210.0170.07720.54
5.6.200.0170.07318.21
5.6.190.0070.04020.39
5.6.180.0300.08020.33
5.6.170.0300.08320.55
5.6.160.0100.07720.71
5.6.150.0070.06718.16
5.6.140.0030.04318.15
5.6.130.0070.04018.18
5.6.120.0170.07721.02
5.6.110.0070.08321.02
5.6.100.0030.04021.03
5.6.90.0070.06021.15
5.6.80.0170.07020.53
5.5.350.0100.08720.45
5.5.340.0100.04718.08
5.5.330.0030.05020.13
5.5.320.0130.04720.35
5.5.310.0200.08020.19
5.5.300.0100.07717.95
5.5.290.0030.04318.08
5.5.280.0130.07720.67
5.5.270.0070.07020.88
5.5.260.0070.04320.89
5.5.250.0100.05320.45
5.5.240.3670.04320.25
5.4.450.0600.06019.46
5.4.440.0870.05319.19
5.4.430.0630.06319.58
5.4.420.0670.00019.52
5.4.410.0630.00019.52
5.4.400.0600.00019.13
5.4.390.0630.00019.16
5.4.380.0630.00019.11
5.4.370.0630.00019.06
5.4.360.0630.00019.21
5.4.350.0630.00019.11
5.4.340.0040.03712.03
5.4.320.0080.03912.52
5.4.310.0040.04512.52
5.4.300.0070.03712.52
5.4.290.0110.03512.52
5.4.280.0050.03612.41
5.4.270.0060.03712.41
5.4.260.0090.03412.41
5.4.250.0060.03612.41
5.4.240.0060.03512.41
5.4.230.0070.04012.41
5.4.220.0070.03612.41
5.4.210.0050.03512.41
5.4.200.0060.03612.41
5.4.190.0030.03812.40
5.4.180.0090.03312.40
5.4.170.0060.03612.41
5.4.160.0040.03812.40
5.4.150.0110.03712.40
5.4.140.0090.03312.09
5.4.130.0060.03512.07
5.4.120.0030.03612.03
5.4.110.0070.03312.02
5.4.100.0070.03312.03
5.4.90.0070.03512.03
5.4.80.0060.03612.03
5.4.70.0090.03212.03
5.4.60.0040.04412.02
5.4.50.0060.03612.02
5.4.40.0050.03612.02
5.4.30.0070.03712.01
5.4.20.0080.04012.01
5.4.10.0080.03712.00
5.4.00.0070.03911.50
5.3.290.0070.03712.80
5.3.280.0110.03112.71
5.3.270.0080.04412.72
5.3.260.0060.03812.72
5.3.250.0120.03112.71
5.3.240.0080.03612.71
5.3.230.0100.03312.71
5.3.220.0070.03512.68
5.3.210.0070.03812.68
5.3.200.0070.03512.68
5.3.190.0080.04012.67
5.3.180.0110.03512.67
5.3.170.0080.03312.67
5.3.160.0070.03512.68
5.3.150.0080.03412.67
5.3.140.0050.03612.66
5.3.130.0070.03712.66
5.3.120.0090.03512.65
5.3.110.0040.04012.66
5.3.100.0080.03512.13
5.3.90.0020.04012.12
5.3.80.0060.03612.11
5.3.70.0070.03512.12
5.3.60.0070.03412.09
5.3.50.0050.03612.04
5.3.40.0090.03312.04
5.3.30.0070.03312.00
5.3.20.0090.03411.79
5.3.10.0070.03211.75
5.3.00.0060.03611.73
5.2.170.0040.0299.18
5.2.160.0070.0299.18
5.2.150.0060.0289.18
5.2.140.0010.0339.18
5.2.130.0040.0289.14
5.2.120.0050.0289.14
5.2.110.0030.0379.15
5.2.100.0020.0369.14
5.2.90.0060.0349.14
5.2.80.0030.0349.14
5.2.70.0070.0349.14
5.2.60.0100.0299.09
5.2.50.0060.0319.06
5.2.40.0060.0279.04
5.2.30.0100.0279.01
5.2.20.0040.0299.00
5.2.10.0050.0298.93
5.2.00.0050.0318.79
5.1.60.0040.0248.06
5.1.50.0080.0228.07
5.1.40.0060.0318.05
5.1.30.0020.0278.40
5.1.20.0060.0258.42
5.1.10.0040.0308.14
5.1.00.0060.0268.14
5.0.50.0020.0226.62
5.0.40.0040.0226.48
5.0.30.0050.0366.29
5.0.20.0060.0186.27
5.0.10.0050.0186.24
5.0.00.0020.0326.23
4.4.90.0030.0144.78
4.4.80.0030.0144.75
4.4.70.0080.0144.76
4.4.60.0010.0174.75
4.4.50.0040.0224.77
4.4.40.0030.0244.71
4.4.30.0010.0174.76
4.4.20.0030.0144.84
4.4.10.0010.0174.85
4.4.00.0020.0334.76
4.3.110.0020.0164.67
4.3.100.0030.0234.66
4.3.90.0030.0204.63
4.3.80.0030.0294.59
4.3.70.0030.0144.63
4.3.60.0050.0204.63
4.3.50.0030.0204.63
4.3.40.0060.0254.54
4.3.30.0000.0183.28
4.3.20.0020.0183.26
4.3.10.0050.0213.22
4.3.00.0100.0237.29

preferences:
47.26 ms | 401 KiB | 5 Q