3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = array(1,2,3); foreach($foo as $treco) print_r($treco);

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.70.0120.00616.63
8.3.60.0100.00718.37
8.3.50.0130.00822.89
8.3.40.0090.00618.77
8.3.30.0070.00719.04
8.3.20.0040.00420.38
8.3.10.0040.00421.77
8.3.00.0030.00517.91
8.2.180.0120.00916.75
8.2.170.0100.01022.96
8.2.160.0100.01020.34
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0050.00320.95
8.2.110.0000.01122.25
8.2.100.0070.00418.09
8.2.90.0000.00719.22
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0030.00717.66
8.2.50.0030.00618.07
8.2.40.0000.00818.22
8.2.30.0070.00017.96
8.2.20.0040.00417.63
8.2.10.0050.00318.05
8.2.00.0000.00817.61
8.1.280.0140.00725.92
8.1.270.0050.00323.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00023.73
8.1.230.0080.00319.01
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0070.00417.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0000.00822.00
8.1.150.0040.00418.91
8.1.140.0070.00017.46
8.1.130.0070.00017.73
8.1.120.0050.00217.45
8.1.110.0000.00717.45
8.1.100.0070.00017.34
8.1.90.0040.00417.34
8.1.80.0050.00217.46
8.1.70.0070.00017.31
8.1.60.0030.00517.58
8.1.50.0030.00617.41
8.1.40.0040.00417.43
8.1.30.0030.00617.66
8.1.20.0020.00517.64
8.1.10.0000.00717.33
8.1.00.0040.00417.44
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0070.00018.44
8.0.270.0070.00017.24
8.0.260.0030.00317.24
8.0.250.0050.00317.00
8.0.240.0000.00716.97
8.0.230.0000.00716.86
8.0.220.0070.00016.77
8.0.210.0030.00316.90
8.0.200.0040.00416.98
8.0.190.0000.00816.92
8.0.180.0000.00716.80
8.0.170.0040.00416.99
8.0.160.0080.00016.93
8.0.150.0030.00316.95
8.0.140.0040.00416.88
8.0.130.0000.00513.42
8.0.120.0000.00816.89
8.0.110.0040.00416.90
8.0.100.0040.00416.83
8.0.90.0000.00716.92
8.0.80.0080.00816.84
8.0.70.0050.00316.92
8.0.60.0040.00416.74
8.0.50.0040.00416.73
8.0.30.0080.01317.17
8.0.20.0170.00517.40
8.0.10.0040.00416.84
8.0.00.0140.00616.82
7.4.330.0030.00315.00
7.4.320.0000.00716.50
7.4.300.0030.00316.49
7.4.290.0000.00716.50
7.4.280.0000.00816.35
7.4.270.0070.00016.45
7.4.260.0030.00316.38
7.4.250.0080.00016.46
7.4.240.0060.00216.48
7.4.230.0000.00716.41
7.4.220.0100.01016.63
7.4.210.0030.01016.54
7.4.200.0000.00716.50
7.4.160.0110.01116.38
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0120.00616.35
7.4.120.0080.01416.40
7.4.110.0120.00416.34
7.4.100.0080.00816.58
7.4.90.0100.00716.27
7.4.80.0110.00819.39
7.4.70.0080.01516.45
7.4.60.0090.00916.37
7.4.50.0030.00616.30
7.4.40.0090.01216.46
7.4.30.0100.00616.58
7.4.00.0080.00914.97
7.3.330.0000.00713.19
7.3.320.0000.00513.19
7.3.310.0070.00016.36
7.3.300.0070.00016.24
7.3.290.0070.00716.23
7.3.280.0110.00816.25
7.3.270.0100.00717.40
7.3.260.0110.00716.38
7.3.250.0100.00716.56
7.3.240.0150.01016.21
7.3.230.0090.00616.39
7.3.210.0110.00516.32
7.3.200.0070.01119.39
7.3.190.0060.00916.43
7.3.180.0100.00716.23
7.3.170.0070.01016.46
7.3.160.0110.01216.42
7.3.120.0050.01214.80
7.3.110.0030.01415.00
7.3.100.0110.00714.79
7.3.90.0030.00914.87
7.3.80.0070.00714.73
7.3.70.0070.00714.66
7.3.60.0000.01314.86
7.3.50.0000.01214.98
7.3.40.0050.00514.81
7.3.30.0070.01014.86
7.3.20.0040.01216.34
7.3.10.0060.00616.62
7.3.00.0030.00616.67
7.2.330.0210.00016.42
7.2.320.0130.00316.56
7.2.310.0130.00316.55
7.2.300.0140.00316.62
7.2.290.0160.00016.46
7.2.250.0070.01315.17
7.2.240.0070.01415.12
7.2.230.0070.00714.59
7.2.220.0060.00615.00
7.2.210.0100.00315.13
7.2.200.0030.01314.86
7.2.190.0060.00614.73
7.2.180.0070.00714.96
7.2.170.0070.00314.82
7.2.00.0040.01219.46
7.1.330.0120.00015.60
7.1.320.0080.00315.90
7.1.310.0050.00315.64
7.1.300.0030.00915.82
7.1.290.0090.00615.67
7.1.280.0040.01415.67
7.1.270.0070.00715.69
7.1.260.0060.00515.66
7.1.100.0210.00018.08
7.1.70.0080.00017.13
7.1.60.0110.01419.40
7.1.50.0080.01517.03
7.1.00.0100.07022.46
7.0.200.0000.01016.89
7.0.140.0000.07722.12
7.0.60.0070.03720.08
7.0.50.0030.06717.77
7.0.40.0070.08720.02
7.0.30.0500.07020.04
7.0.20.0200.08320.19
7.0.10.0130.08020.16
7.0.00.0070.08320.13
5.6.280.0000.07320.78
5.6.210.0130.07720.60
5.6.200.0070.04318.18
5.6.190.0030.05320.67
5.6.180.0400.07020.43
5.6.170.0330.03320.46
5.6.160.0100.05720.37
5.6.150.0030.08318.22
5.6.140.0100.07718.11
5.6.130.0030.04318.07
5.6.120.0170.05021.02
5.6.110.0070.08721.04
5.6.100.0100.08320.95
5.6.90.0100.07321.10
5.6.80.0100.05020.37
5.5.350.0070.08020.39
5.5.340.0030.08017.98
5.5.330.0100.04320.23
5.5.320.0400.07320.23
5.5.310.0230.03320.29
5.5.300.0070.07718.02
5.5.290.0170.07718.03
5.5.280.0100.04020.80
5.5.270.0030.09020.79
5.5.260.0030.07320.75
5.5.250.0070.05020.66
5.5.240.0300.06020.29
5.4.450.0430.04719.15
5.4.440.0470.04319.39
5.4.430.0470.04019.12
5.4.420.0600.05019.27
5.4.410.0770.04019.11
5.4.400.0430.03718.81
5.4.390.0500.04318.90
5.4.380.0400.07018.53
5.4.370.0400.07018.50
5.4.360.0300.05318.59
5.4.350.0230.06018.46
5.4.340.0400.05718.70
5.4.320.0080.03612.45
5.4.310.0060.03812.45
5.4.300.0040.03812.45
5.4.290.0060.03612.45
5.4.280.0030.03712.34
5.4.270.0050.03612.34
5.4.260.0020.04112.35
5.4.250.0070.03612.35
5.4.240.0080.03612.34
5.4.230.0050.04212.34
5.4.220.0040.03712.34
5.4.210.0040.03612.34
5.4.200.0060.03812.34
5.4.190.0060.03612.34
5.4.180.0100.03212.34
5.4.170.0100.03212.34
5.4.160.0050.03712.34
5.4.150.0080.03312.34
5.4.140.0080.03412.02
5.4.130.0060.03512.01
5.4.120.0080.03511.97
5.4.110.0110.03211.97
5.4.100.0040.03711.96
5.4.90.0050.03911.97
5.4.80.0070.03711.96
5.4.70.0070.03711.96
5.4.60.0080.03411.96
5.4.50.0060.03411.96
5.4.40.0060.03411.95
5.4.30.0050.03611.95
5.4.20.0060.03511.95
5.4.10.0080.03211.94
5.4.00.0050.03811.44
5.3.290.0090.04312.80
5.3.280.0080.03712.71
5.3.270.0070.03812.72
5.3.260.0070.04112.72
5.3.250.0080.03412.72
5.3.240.0070.03612.72
5.3.230.0050.03912.71
5.3.220.0060.03712.68
5.3.210.0070.03812.68
5.3.200.0040.03812.68
5.3.190.0060.03712.68
5.3.180.0070.03712.68
5.3.170.0060.03712.67
5.3.160.0060.03712.67
5.3.150.0060.03712.68
5.3.140.0080.03412.66
5.3.130.0050.04512.66
5.3.120.0060.03812.66
5.3.110.0070.04012.66
5.3.100.0120.03012.12
5.3.90.0060.03612.08
5.3.80.0070.03512.08
5.3.70.0070.04212.08
5.3.60.0080.03812.06
5.3.50.0070.03412.00
5.3.40.0050.04412.00
5.3.30.0030.03611.94
5.3.20.0070.03511.72
5.3.10.0070.03311.69
5.3.00.0060.03511.67
5.2.170.0040.0319.18
5.2.160.0040.0309.18
5.2.150.0040.0319.18
5.2.140.0040.0349.18
5.2.130.0050.0319.14
5.2.120.0080.0409.14
5.2.110.0060.0299.14
5.2.100.0070.0299.14
5.2.90.0020.0359.14
5.2.80.0020.0329.14
5.2.70.0060.0289.14
5.2.60.0050.0299.08
5.2.50.0040.0309.06
5.2.40.0050.0299.03
5.2.30.0040.0309.01
5.2.20.0030.0319.00
5.2.10.0060.0268.93
5.2.00.0060.0328.79
5.1.60.0030.0258.07
5.1.50.0050.0248.07
5.1.40.0050.0308.05
5.1.30.0030.0328.40
5.1.20.0050.0268.43
5.1.10.0060.0298.15
5.1.00.0020.0278.15
5.0.50.0010.0246.63
5.0.40.0040.0186.49
5.0.30.0050.0296.30
5.0.20.0030.0196.27
5.0.10.0040.0256.24
5.0.00.0040.0316.23
4.4.90.0010.0184.78
4.4.80.0010.0174.76
4.4.70.0030.0154.75
4.4.60.0020.0164.76
4.4.50.0010.0174.77
4.4.40.0050.0224.71
4.4.30.0030.0174.76
4.4.20.0000.0234.84
4.4.10.0030.0164.85
4.4.00.0040.0324.76
4.3.110.0030.0184.67
4.3.100.0040.0154.66
4.3.90.0040.0144.63
4.3.80.0040.0244.58
4.3.70.0020.0184.63
4.3.60.0020.0154.63
4.3.50.0040.0144.63
4.3.40.0040.0224.54
4.3.30.0020.0163.29
4.3.20.0050.0133.27
4.3.10.0040.0153.22
4.3.00.0070.01315.89

preferences:
55.17 ms | 401 KiB | 5 Q