3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f4 = null; $zero = 0; // global scope $f1 = function() use ($zero) { $one = 1; // third-level closure scope of f4 $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 $f3 = function() use ($zero, $one, $two) { global $f4; $three = 3; // first-level closure scope of f4 $f4 = function() use ($zero, $one, $two, $three) { $four = 4; // local scope of f4 echo $zero + $one + $two + $three + $four; }; }; }; }; var_dump($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.0150.00018.43
8.3.50.0130.01022.04
8.3.40.0120.00918.60
8.3.30.0100.00719.04
8.3.20.0070.00020.33
8.3.10.0060.00321.96
8.3.00.0080.00019.22
8.2.180.0100.00316.38
8.2.170.0090.00622.96
8.2.160.0170.00020.22
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.22
8.2.110.0140.00720.57
8.2.100.0040.00718.09
8.2.90.0000.00819.26
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0030.00518.04
8.2.50.0040.00418.07
8.2.40.0000.00820.07
8.2.30.0000.00718.13
8.2.20.0030.00617.72
8.2.10.0050.00318.15
8.2.00.0030.00617.75
8.1.280.0100.00725.92
8.1.270.0110.00822.09
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.97
8.1.230.0120.00019.10
8.1.220.0030.00517.74
8.1.210.0030.00618.77
8.1.200.0100.00017.23
8.1.190.0040.00417.23
8.1.180.0020.00518.10
8.1.170.0080.00018.59
8.1.160.0050.00321.89
8.1.150.0040.00418.90
8.1.140.0040.00417.36
8.1.130.0050.00217.74
8.1.120.0050.00217.55
8.1.110.0050.00317.36
8.1.100.0030.00517.44
8.1.90.0050.00317.48
8.1.80.0060.00317.50
8.1.70.0080.00017.35
8.1.60.0080.00017.48
8.1.50.0000.00817.54
8.1.40.0040.00417.39
8.1.30.0040.00417.48
8.1.20.0000.00817.72
8.1.10.0000.00717.48
8.1.00.0030.00517.38
8.0.300.0070.00018.77
8.0.290.0030.00316.63
8.0.280.0030.00318.34
8.0.270.0050.00317.19
8.0.260.0000.00617.18
8.0.250.0040.00416.94
8.0.240.0030.00616.94
8.0.230.0000.00716.89
8.0.220.0070.00016.74
8.0.210.0040.00416.66
8.0.200.0030.00316.82
8.0.190.0040.00416.93
8.0.180.0040.00416.80
8.0.170.0000.00916.79
8.0.160.0000.00716.88
8.0.150.0050.00216.72
8.0.140.0030.00416.86
8.0.130.0040.00413.33
8.0.120.0040.00416.90
8.0.110.0000.00716.89
8.0.100.0050.00317.01
8.0.90.0040.00416.79
8.0.80.0030.01716.85
8.0.70.0070.00016.83
8.0.60.0040.00416.84
8.0.50.0040.00416.68
8.0.30.0050.01417.04
8.0.20.0130.00717.40
8.0.10.0000.00916.90
8.0.00.0080.01416.56
7.4.330.0030.00315.02
7.4.320.0000.00716.49
7.4.300.0000.00616.36
7.4.290.0030.00316.51
7.4.280.0040.00716.50
7.4.270.0030.00316.38
7.4.260.0000.00716.41
7.4.250.0000.00716.46
7.4.240.0040.00316.43
7.4.230.0000.00816.34
7.4.220.0130.00616.45
7.4.210.0030.01316.63
7.4.200.0070.00016.65
7.4.160.0110.00416.44
7.4.150.0030.01417.40
7.4.140.0120.00817.86
7.4.130.0160.00116.62
7.4.120.0130.00516.46
7.4.110.0060.01216.63
7.4.100.0160.00016.43
7.4.90.0120.00616.39
7.4.80.0160.00719.39
7.4.70.0100.00716.64
7.4.60.0140.00416.54
7.4.50.0030.00616.28
7.4.40.0090.00616.45
7.4.30.0140.00716.39
7.4.00.0060.00914.69
7.3.330.0050.00013.13
7.3.320.0000.00613.24
7.3.310.0000.00616.21
7.3.300.0080.00016.31
7.3.290.0050.01116.24
7.3.280.0090.00916.30
7.3.270.0130.00617.40
7.3.260.0150.00916.46
7.3.250.0100.01016.29
7.3.240.0030.01316.38
7.3.230.0050.01116.59
7.3.210.0060.00916.27
7.3.200.0030.01719.39
7.3.190.0040.01516.35
7.3.180.0040.01116.24
7.3.170.0130.00916.43
7.3.160.0070.01416.32
7.3.120.0130.00614.87
7.3.110.0070.01314.59
7.3.100.0060.00615.09
7.3.90.0130.00314.79
7.3.80.0110.00415.08
7.3.70.0130.00014.66
7.3.60.0080.00414.66
7.3.50.0100.00614.83
7.3.40.0070.00714.68
7.3.30.0070.00714.78
7.3.20.0120.00316.68
7.3.10.0000.01316.55
7.3.00.0040.00716.57
7.2.330.0180.00316.64
7.2.320.0110.00716.38
7.2.310.0070.01116.30
7.2.300.0030.01516.31
7.2.290.0140.00716.61
7.2.240.0090.00915.09
7.2.230.0100.00714.71
7.2.220.0060.00915.13
7.2.210.0060.01014.77
7.2.200.0130.00714.87
7.2.190.0090.00614.89
7.2.180.0030.01314.93
7.2.170.0060.01014.71
7.2.160.0060.00914.73
7.2.150.0070.00716.65
7.2.140.0100.00316.55
7.2.130.0100.00316.77
7.2.120.0060.00916.60
7.2.110.0000.01316.80
7.2.100.0040.01116.75
7.2.90.0070.01016.75
7.2.80.0090.00616.76
7.2.70.0090.00316.53
7.2.60.0050.01016.81
7.2.50.0150.00416.92
7.2.40.0040.00716.90
7.2.30.0130.00016.85
7.2.20.0030.01016.60
7.2.10.0000.01316.81
7.2.00.0060.00518.05
7.1.330.0040.00715.77
7.1.320.0040.00415.68
7.1.310.0060.00915.92
7.1.300.0100.00415.85
7.1.290.0030.01015.57
7.1.280.0060.00915.80
7.1.270.0100.00315.44
7.1.260.0030.01315.98
7.1.250.0000.00915.94
7.1.200.0030.00715.94
7.1.100.0050.00518.08
7.1.70.0030.00616.87
7.1.60.0110.01419.11
7.1.50.0110.00316.90
7.1.00.0030.08022.45
7.0.200.0080.00016.73
7.0.140.0030.07321.95
7.0.60.0070.08719.88
7.0.50.0130.07317.88
7.0.40.0070.06019.96
7.0.30.0170.05020.24
7.0.20.0270.07720.15
7.0.10.0070.04720.26
7.0.00.0130.08320.05
5.6.280.0100.06721.14
5.6.210.0070.06020.71
5.6.200.0070.08318.16
5.6.190.0030.04320.52
5.6.180.0200.05020.61
5.6.170.0370.06320.54
5.6.160.0000.09320.46
5.6.150.0070.08018.19
5.6.140.0100.07318.20
5.6.130.0000.05318.14
5.6.120.0070.04021.16
5.6.110.0130.06721.15
5.6.100.0100.06321.03
5.6.90.0070.06021.01
5.6.80.0030.08320.39
5.6.70.4270.04020.34
5.5.350.0230.07020.45
5.5.340.0130.06718.04
5.5.330.0030.05720.40
5.5.320.0170.06720.29
5.5.310.0300.07720.28
5.5.300.0030.04017.91
5.5.290.0030.08017.97
5.5.280.0170.07020.79
5.5.270.0030.08720.97
5.5.260.0100.08720.95
5.5.250.0100.07020.70
5.5.240.0200.07720.20
5.4.450.2100.04319.50
5.4.440.2130.05019.47
5.4.430.2030.05019.31
5.4.420.1730.03019.46
5.4.410.2170.04719.38
5.4.400.0030.06019.24
5.4.390.0100.06019.14
5.4.380.0030.03719.16
5.4.370.0970.06319.21
5.4.360.1830.04019.11
5.4.350.1870.04318.95
5.4.340.1870.04319.00
5.4.320.2170.04019.08
5.4.310.2070.03319.14
5.4.300.2000.03019.30
5.4.290.1970.03719.21
5.4.280.1870.04019.21
5.4.270.1930.04019.12
5.4.260.2130.03718.94
5.4.250.2000.05019.05
5.4.240.2070.04019.02
5.4.230.1870.03318.86
5.4.220.1800.04019.07
5.4.210.2130.03018.98
5.4.200.2530.03019.21
5.4.190.2030.03719.20
5.4.180.1900.03719.13
5.4.170.1770.03718.98
5.4.160.1900.03319.21
5.4.150.2030.04019.17
5.4.140.1900.04316.44
5.4.130.2000.03716.38
5.4.120.2100.04016.50
5.4.110.1970.03716.30
5.4.100.1970.04316.59
5.4.90.1970.03316.50
5.4.80.2070.04316.28
5.4.70.1970.04016.66
5.4.60.2100.04316.51
5.4.50.2170.03316.42
5.4.40.2000.04016.17
5.4.30.1930.03316.50
5.4.20.2070.04316.54
5.4.10.0970.04016.37
5.4.00.0100.07016.11
5.3.290.0100.04314.59
5.3.280.0030.05314.62
5.3.270.2100.04014.55
5.3.260.1900.04014.68
5.3.250.1800.03714.71
5.3.240.2070.04314.67
5.3.230.2170.03314.52
5.3.220.1800.03714.59
5.3.210.2200.03714.63
5.3.200.1970.03314.56
5.3.190.1700.04714.55
5.3.180.2070.04014.63
5.3.170.2170.03714.55
5.3.160.2070.03314.63
5.3.150.2030.04314.52
5.3.140.2070.04014.58
5.3.130.2000.04314.59
5.3.120.1770.04014.54
5.3.110.2170.03714.48
5.3.100.1870.03713.96
5.3.90.2030.04313.94
5.3.80.1930.03014.06
5.3.70.2030.03314.13
5.3.60.1900.03713.93
5.3.50.1770.03713.88
5.3.40.2170.03713.98
5.3.30.2000.03313.99
5.3.20.1870.03313.71
5.3.10.1800.04013.73
5.3.00.1970.04313.57
5.2.170.1500.03711.00
5.2.160.1530.03011.23
5.2.150.1670.03310.99
5.2.140.1700.03311.08
5.2.130.1870.03711.11
5.2.120.1600.02711.15
5.2.110.1630.03011.04
5.2.100.1570.03011.11
5.2.90.2100.02710.94
5.2.80.1600.02710.94
5.2.70.1530.03310.94
5.2.60.1100.03011.09
5.2.50.0030.03010.92
5.2.40.0100.02310.93
5.2.30.0000.03010.88
5.2.20.0570.02310.84
5.2.10.1270.03010.77
5.2.00.1300.03010.79
5.1.60.1670.0209.92
5.1.50.1570.03310.04
5.1.40.1330.01710.13
5.1.30.1300.02010.28
5.1.20.1230.02310.43
5.1.10.1030.03010.00
5.1.00.1430.03310.11
5.0.50.0600.0238.53
5.0.40.0630.0208.57
5.0.30.0630.0278.20
5.0.20.0630.0178.09
5.0.10.0570.0238.29
5.0.00.0730.0338.13
4.4.90.0500.0137.99
4.4.80.0630.0137.99
4.4.70.0230.0137.99
4.4.60.0170.0177.99
4.4.50.0070.0177.99
4.4.40.0100.0207.99
4.4.30.0030.0207.99
4.4.20.0070.0177.99
4.4.10.0000.0237.99
4.4.00.0070.0237.99
4.3.110.0070.0137.99
4.3.100.0030.0177.99
4.3.90.0030.0177.99
4.3.80.0030.0307.99
4.3.70.0030.0207.99
4.3.60.0030.0177.99
4.3.50.0070.0237.99
4.3.40.0070.0277.99
4.3.30.0030.0137.99
4.3.20.0000.0177.99
4.3.10.0000.0207.99
4.3.00.0030.0207.99

preferences:
45.3 ms | 401 KiB | 5 Q