3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array( 'a' => 'a', 'b' => 'b', ); foreach ($var as $value) { } var_dump(key($var));

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.4.10.0030.00617.39
8.3.140.0060.00919.04
8.3.130.0030.00618.43
8.3.120.0030.00620.81
8.3.110.0080.00020.94
8.3.100.0070.00416.73
8.3.90.0040.00416.57
8.3.80.0030.00618.55
8.3.70.0040.01118.43
8.3.60.0110.00318.56
8.3.50.0090.00921.09
8.3.40.0070.00718.42
8.3.30.0140.00018.42
8.3.20.0070.00020.34
8.3.10.0060.00323.58
8.3.00.0040.00423.48
8.2.260.0110.00718.20
8.2.250.0090.00916.64
8.2.240.0040.01117.30
8.2.230.0130.00622.58
8.2.220.0060.00324.06
8.2.210.0100.00326.77
8.2.200.0060.00318.41
8.2.190.0150.00020.05
8.2.180.0110.01116.63
8.2.170.0180.00422.96
8.2.160.0100.01020.23
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.19
8.2.110.0030.00719.39
8.2.100.0030.01119.47
8.2.90.0040.00419.15
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0000.00917.80
8.2.50.0040.00718.09
8.2.40.0030.00622.32
8.2.30.0050.00219.41
8.2.20.0040.00417.68
8.2.10.0020.00518.04
8.2.00.0000.00817.98
8.1.310.0040.00418.31
8.1.300.0060.00318.45
8.1.290.0060.00318.88
8.1.280.0100.00725.92
8.1.270.0060.01321.94
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00319.16
8.1.230.0040.00817.72
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0090.00017.00
8.1.190.0000.00917.23
8.1.180.0060.00318.10
8.1.170.0050.00318.46
8.1.160.0070.00020.71
8.1.150.0070.00020.67
8.1.140.0040.00419.45
8.1.130.0000.00717.72
8.1.120.0000.00717.45
8.1.110.0040.00417.43
8.1.100.0000.00717.44
8.1.90.0000.00817.48
8.1.80.0060.00317.34
8.1.70.0000.00717.49
8.1.60.0000.00817.50
8.1.50.0050.00317.42
8.1.40.0040.00717.53
8.1.30.0000.00817.68
8.1.20.0040.00417.55
8.1.10.0030.00517.49
8.1.00.0030.00517.39
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00318.43
8.0.270.0000.00717.16
8.0.260.0060.00017.25
8.0.250.0030.00317.01
8.0.240.0000.00716.89
8.0.230.0030.00316.93
8.0.220.0000.00716.84
8.0.210.0000.00716.90
8.0.200.0000.00616.86
8.0.190.0040.00716.89
8.0.180.0000.00716.89
8.0.170.0050.00216.87
8.0.160.0000.00716.93
8.0.150.0030.00416.91
8.0.140.0030.00316.75
8.0.130.0000.00613.25
8.0.120.0030.00516.91
8.0.110.0040.00416.90
8.0.100.0020.00516.71
8.0.90.0000.00716.80
8.0.80.0070.01016.94
8.0.70.0000.00816.94
8.0.60.0040.00416.75
8.0.50.0040.00416.93
8.0.30.0160.00417.08
8.0.20.0100.01117.40
8.0.10.0050.00516.80
8.0.00.0100.01116.72
7.4.330.0030.00215.08
7.4.320.0030.00316.62
7.4.300.0030.00316.58
7.4.290.0030.00616.48
7.4.280.0000.01216.60
7.4.270.0000.00716.59
7.4.260.0040.00416.51
7.4.250.0000.00716.36
7.4.240.0070.00016.55
7.4.230.0000.00716.52
7.4.220.0160.00316.54
7.4.210.0070.00816.54
7.4.200.0000.00716.31
7.4.160.0060.00916.55
7.4.150.0170.00017.40
7.4.140.0130.01117.86
7.4.130.0050.01216.53
7.4.120.0120.00716.53
7.4.110.0100.00716.25
7.4.100.0050.01416.59
7.4.90.0030.02016.40
7.4.80.0110.01219.39
7.4.70.0070.01016.50
7.4.60.0030.01216.37
7.4.50.0070.00716.35
7.4.40.0170.00716.50
7.4.30.0060.01216.28
7.4.00.0110.00715.01
7.3.330.0000.00513.09
7.3.320.0050.00013.15
7.3.310.0000.00616.33
7.3.300.0070.00016.27
7.3.290.0000.00716.28
7.3.280.0090.00816.33
7.3.270.0080.00817.40
7.3.260.0190.00616.51
7.3.250.0100.00816.45
7.3.240.0110.00716.26
7.3.230.0120.00616.39
7.3.210.0080.00816.51
7.3.200.0070.01016.16
7.3.190.0040.01316.60
7.3.180.0130.00316.41
7.3.170.0100.00716.43
7.3.160.0080.00816.66
7.2.330.0090.00916.64
7.2.320.0070.01016.32
7.2.310.0080.00816.73
7.2.300.0100.01016.63
7.2.290.0080.01516.41
7.2.60.0030.01016.63
7.2.00.0100.00019.11
7.1.200.0040.00815.80
7.1.100.0070.01518.21
7.1.70.0040.00416.91
7.1.60.0140.01019.40
7.1.50.0240.01034.59
7.1.00.0030.07722.33
7.0.200.0060.00316.53
7.0.100.0370.07719.95
7.0.90.0100.04020.16
7.0.80.0030.06320.02
7.0.70.0100.08020.15
7.0.60.0130.07319.92
7.0.50.0470.09020.34
7.0.40.0100.08020.05
7.0.30.0070.08720.14
7.0.20.0070.08720.04
7.0.10.0170.05720.10
7.0.00.0070.07320.04
5.6.280.0030.03021.02
5.6.250.0030.07320.57
5.6.240.0170.08320.69
5.6.230.0070.07320.59
5.6.220.0200.06720.61
5.6.210.0130.04020.57
5.6.200.0100.08321.11
5.6.190.0170.07321.03
5.6.180.0030.08721.03
5.6.170.0270.06721.13
5.6.160.0130.07020.95
5.6.150.0070.04721.04
5.6.140.0100.05021.03
5.6.130.0100.07021.08
5.6.120.0100.06721.07
5.6.110.0100.04320.94
5.6.100.0130.04321.00
5.6.90.0070.04021.09
5.6.80.0030.07320.42
5.6.70.0070.08320.45
5.6.60.0070.04720.41
5.6.50.0030.07720.39
5.6.40.0030.08320.36
5.6.30.0130.07020.42
5.6.20.0070.08320.37
5.6.10.0100.04320.38
5.6.00.0070.03720.40
5.5.380.0100.07020.56
5.5.370.0030.09020.36
5.5.360.0070.05020.43
5.5.350.0100.08020.43
5.5.340.0100.07720.90
5.5.330.0100.08320.64
5.5.320.0000.07020.88
5.5.310.0030.08020.77
5.5.300.0130.06320.80
5.5.290.0030.05020.92
5.5.280.0070.07020.87
5.5.270.0000.06720.74
5.5.260.0070.07720.85
5.5.250.0000.05020.71
5.5.240.0130.04020.09
5.5.230.0070.08020.25
5.5.220.0070.06720.28
5.5.210.0100.04020.25
5.5.200.0030.08720.11
5.5.190.0070.08720.14
5.5.180.0130.08020.17
5.5.160.0100.07720.12
5.5.150.0200.05720.07
5.5.140.0030.08020.18
5.5.130.0000.07720.17
5.5.120.0100.07720.23
5.5.110.0070.08020.16
5.5.100.0100.06720.16
5.5.90.0130.07320.07
5.5.80.0100.04020.09
5.5.70.0130.06020.13
5.5.60.0070.03720.08
5.5.50.0100.06720.10
5.5.40.0070.07320.04
5.5.30.0170.05720.12
5.5.20.0100.07019.89
5.5.10.0100.03319.97
5.5.00.0030.07720.07
5.4.450.0100.04319.47
5.4.440.0130.07719.55
5.4.430.0030.04019.35
5.4.420.0130.03719.29
5.4.410.0030.04719.24
5.4.400.0100.07718.79
5.4.390.0100.07319.10
5.4.380.0000.04319.22
5.4.370.0130.05318.79
5.4.360.0030.06718.97
5.4.350.0200.06019.07
5.4.340.0030.04318.95
5.4.320.0100.07719.09
5.4.310.0070.06319.13
5.4.300.0030.08319.12
5.4.290.0070.03718.80
5.4.280.0070.07319.03
5.4.270.0030.08018.78
5.4.260.0030.04019.07
5.4.250.0030.06319.07
5.4.240.0100.07319.12
5.4.230.0200.06319.09
5.4.220.0100.07318.75
5.4.210.0100.03319.13
5.4.200.0030.05019.11
5.4.190.0030.08018.77
5.4.180.0130.03318.80
5.4.170.0100.03019.05
5.4.160.0000.03718.95
5.4.150.0100.03718.76
5.4.140.0030.03316.37
5.4.130.0100.03016.38
5.4.120.0070.03016.32
5.4.110.0100.04316.30
5.4.100.0000.04016.21
5.4.90.0000.04016.30
5.4.80.0000.04016.29
5.4.70.0070.03316.34
5.4.60.0100.02716.18
5.4.50.0070.03316.24
5.4.40.0070.03316.24
5.4.30.0030.03716.41
5.4.20.0000.04716.18
5.4.10.0030.03716.35
5.4.00.0030.03315.70
5.3.290.0000.08014.51
5.3.280.0070.03714.42
5.3.270.0100.07714.54
5.3.260.0100.03014.55
5.3.250.0030.03314.46
5.3.240.0000.03714.43
5.3.230.0000.06314.58
5.3.220.0070.05014.42
5.3.210.0100.06014.51
5.3.200.0030.03714.57
5.3.190.0030.03314.42
5.3.180.0030.03314.54
5.3.170.0030.05714.41
5.3.160.0030.03314.52
5.3.150.0070.03714.46
5.3.140.0170.02314.53
5.3.130.0030.03714.45
5.3.120.0130.02714.40
5.3.110.0100.03014.50
5.3.100.0030.03714.02
5.3.90.0000.04713.99
5.3.80.0000.05013.77
5.3.70.0170.02713.87
5.3.60.0070.03314.00
5.3.50.0000.04313.80
5.3.40.0000.04713.93
5.3.30.0030.04013.88
5.3.20.0000.04013.55
5.3.10.0030.02713.50
5.3.00.0030.04713.62
5.2.170.0000.03711.18
5.2.160.0070.02711.10
5.2.150.0000.03711.09
5.2.140.0030.02710.97
5.2.130.0000.03310.93
5.2.120.0000.02711.13
5.2.110.0070.04710.89
5.2.100.0070.02311.09
5.2.90.0030.03311.17
5.2.80.0000.03011.13
5.2.70.0030.03011.13
5.2.60.0000.03011.03
5.2.50.0070.02711.05
5.2.40.0030.02310.94
5.2.30.0000.03010.79
5.2.20.0000.03711.02
5.2.10.0030.03010.79
5.2.00.0000.04010.73
5.1.60.0000.02710.43
5.1.50.0030.02310.43
5.1.40.0030.02710.43
5.1.30.0000.02310.43
5.1.20.0070.02010.43
5.1.10.0030.02010.43
5.1.00.0000.03710.43
5.0.50.0070.02010.43
5.0.40.0000.02010.43
5.0.30.0070.02710.43
5.0.20.0000.02010.43
5.0.10.0000.02010.43
5.0.00.0030.02710.43
4.4.90.0000.01710.43
4.4.80.0000.01310.43
4.4.70.0030.01010.43
4.4.60.0000.01710.43
4.4.50.0030.01310.43
4.4.40.0030.02310.43
4.4.30.0000.01710.43
4.4.20.0000.02310.43
4.4.10.0070.01010.43
4.4.00.0000.02710.43
4.3.110.0000.01710.43
4.3.100.0030.01310.43
4.3.90.0000.01710.43
4.3.80.0030.02010.43
4.3.70.0070.01010.43
4.3.60.0000.01310.43
4.3.50.0030.01310.43
4.3.40.0000.02310.43
4.3.30.0000.01710.43
4.3.20.0030.01010.43
4.3.10.0030.01010.43
4.3.00.0000.01710.43

preferences:
28.92 ms | 403 KiB | 5 Q