3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new DatePeriod(new DateTime('2010-05-01'), new DateInterval('P1D'), new DateTime('2010-05-10')); $iteratorOutput = $arrayOutput = ''; foreach ($period as $date) { $iteratorOutput .= $date->format("l Y-m-d H:i:s\n"); } foreach (iterator_to_array($period) as $date) { $arrayOutput .= $date->format("l Y-m-d H:i:s\n"); } var_dump($iteratorOutput, $arrayOutput, iterator_to_array($period));

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.0040.01118.55
8.3.60.0040.01118.43
8.3.50.0160.00622.19
8.3.40.0220.00019.09
8.3.30.0120.00319.21
8.3.20.0040.00420.29
8.3.10.0000.00820.77
8.3.00.0060.00319.63
8.2.180.0070.01116.75
8.2.170.0160.00622.96
8.2.160.0090.00920.41
8.2.150.0080.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0130.00322.16
8.2.110.0030.00620.24
8.2.100.0060.00618.22
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0030.00617.91
8.2.50.0040.00818.07
8.2.40.0030.00518.41
8.2.30.0030.00619.26
8.2.20.0030.00518.00
8.2.10.0050.00218.18
8.2.00.0040.00417.97
8.1.280.0070.01525.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0090.00628.09
8.1.240.0090.00023.78
8.1.230.0110.00019.08
8.1.220.0080.00017.79
8.1.210.0050.00318.77
8.1.200.0040.00417.60
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0080.00018.79
8.1.160.0040.00421.97
8.1.150.0040.00418.95
8.1.140.0080.00017.69
8.1.130.0000.00817.94
8.1.120.0070.00017.68
8.1.110.0000.00717.68
8.1.100.0000.00717.61
8.1.90.0000.00717.60
8.1.80.0060.00317.64
8.1.70.0000.00717.51
8.1.60.0030.00617.68
8.1.50.0080.00017.64
8.1.40.0050.00317.67
8.1.30.0000.00917.79
8.1.20.0030.00517.80
8.1.10.0050.00317.60
8.1.00.0090.00017.77
8.0.300.0000.00718.77
8.0.290.0090.00016.88
8.0.280.0030.00318.48
8.0.270.0070.00017.33
8.0.260.0030.00317.29
8.0.250.0000.00717.22
8.0.240.0000.00917.14
8.0.230.0000.00817.11
8.0.220.0030.00317.06
8.0.210.0040.00417.09
8.0.200.0070.00317.17
8.0.190.0000.00817.16
8.0.180.0040.00417.17
8.0.170.0000.00917.11
8.0.160.0040.00417.07
8.0.150.0040.00417.11
8.0.140.0000.01116.94
8.0.130.0000.00613.40
8.0.120.0040.00417.06
8.0.110.0040.00416.98
8.0.100.0040.00417.15
8.0.90.0020.00516.98
8.0.80.0170.00517.04
8.0.70.0040.00417.14
8.0.60.0070.00017.00
8.0.50.0000.00717.02
8.0.30.0120.01017.40
8.0.20.0150.00917.40
8.0.10.0070.00017.16
8.0.00.0110.01216.98
7.4.330.0030.00315.03
7.4.320.0030.00316.64
7.4.300.0030.00316.78
7.4.290.0030.00316.63
7.4.280.0050.00216.73
7.4.270.0050.00316.50
7.4.260.0000.00716.73
7.4.250.0050.00316.65
7.4.240.0040.00316.67
7.4.230.0080.00016.58
7.4.220.0100.01916.61
7.4.210.0090.00616.84
7.4.200.0040.00416.74
7.4.160.0110.00516.64
7.4.150.0120.00917.40
7.4.140.0090.01117.86
7.4.130.0050.01316.66
7.4.120.0070.01116.68
7.4.110.0040.01516.48
7.4.100.0080.01816.83
7.4.90.0120.00916.66
7.4.80.0060.01219.37
7.4.70.0190.00016.43
7.4.60.0090.01516.69
7.4.50.0000.00816.51
7.4.40.0140.00616.67
7.4.30.0070.01016.72
7.4.00.0070.01115.26
7.3.330.0000.00513.33
7.3.320.0000.00513.25
7.3.310.0030.00516.33
7.3.300.0000.00716.44
7.3.290.0060.00916.39
7.3.280.0100.00716.39
7.3.270.0110.00817.40
7.3.260.0110.01116.59
7.3.250.0040.01816.76
7.3.240.0090.00916.80
7.3.230.0110.00716.69
7.3.210.0060.01416.70
7.3.200.0100.01019.39
7.3.190.0100.00716.60
7.3.180.0030.01416.43
7.3.170.0140.00416.46
7.3.160.0030.01516.70
7.2.330.0150.00516.66
7.2.320.0110.00716.74
7.2.310.0160.00316.95
7.2.300.0160.00317.02
7.2.290.0140.00616.72
7.2.60.0000.01617.02
7.2.00.0000.01419.64
7.1.200.0100.00615.99
7.1.100.0000.01118.54
7.1.70.0000.00717.34
7.1.60.0090.01619.32
7.1.50.0030.02017.05
7.1.00.0030.07722.48
7.0.200.0070.00317.04
7.0.140.0100.06722.00
7.0.60.0100.08019.80
7.0.50.0030.09017.82
7.0.40.0030.08720.20
7.0.30.0400.05020.20
7.0.20.0270.08720.04
7.0.10.0100.08320.16
7.0.00.0130.07720.13
5.6.210.0130.06020.50
5.6.200.0070.06718.12
5.6.190.0070.06320.77
5.6.180.3600.04720.39
5.6.170.0270.08320.38
5.6.160.0070.08020.51
5.6.150.0030.04018.22
5.6.140.0200.06318.19
5.6.130.0170.07018.16
5.6.120.0170.04321.02
5.6.110.0070.03721.07
5.6.100.0170.07321.00
5.6.90.0130.07720.97
5.6.80.0130.07320.52
5.6.70.0370.05720.52
5.5.350.0270.08020.32
5.5.340.0030.08718.07
5.5.330.0030.06320.47
5.5.320.0370.04020.41
5.5.310.0230.03720.30
5.5.300.0030.05317.92
5.5.290.0100.06017.98
5.5.280.0170.07320.72
5.5.270.0170.07720.86
5.5.260.0100.08320.76
5.5.250.0200.06720.54
5.5.240.0330.07020.32
5.4.450.0730.05719.63
5.4.440.0930.06019.26
5.4.430.0870.06019.41
5.4.420.0670.00019.63
5.4.410.0670.00019.38
5.4.400.0630.00019.23
5.4.390.0630.00019.08
5.4.380.0830.06018.74
5.4.370.0270.05318.51
5.4.360.0330.04718.80
5.4.350.0330.08018.75
5.4.340.0300.07718.74
5.4.320.0070.03712.47
5.4.310.0070.03812.46
5.4.300.0030.04012.46
5.4.290.0110.03812.46
5.4.280.0070.03612.36
5.4.270.0060.04412.36
5.4.260.0050.04712.36
5.4.250.0070.05012.36
5.4.240.0120.03812.36
5.4.230.0060.04112.35
5.4.220.0120.03812.36
5.4.210.0060.04112.36
5.4.200.0050.03812.35
5.4.190.0050.03712.35
5.4.180.0050.03612.35
5.4.170.0070.03412.36
5.4.160.0100.03112.35
5.4.150.0080.03312.35
5.4.140.0050.03812.03
5.4.130.0060.03512.02
5.4.120.0080.03211.98
5.4.110.0060.03611.98
5.4.100.0070.03411.98
5.4.90.0100.03711.98
5.4.80.0090.03811.97
5.4.70.0060.04111.97
5.4.60.0080.03211.97
5.4.50.0070.03411.97
5.4.40.0080.03511.96
5.4.30.0060.03711.96
5.4.20.0080.03311.96
5.4.10.0110.03211.96
5.4.00.0080.04211.45
5.3.290.0060.03912.80
5.3.280.0060.03812.71
5.3.270.0040.04712.72
5.3.260.0030.04812.72
5.3.250.0040.04712.72
5.3.240.0110.04012.71
5.3.230.0080.03912.71
5.3.220.0120.04112.68
5.3.210.0080.05312.68
5.3.200.0090.04112.68
5.3.190.0090.05012.68
5.3.180.0070.04212.67
5.3.170.0070.04612.67
5.3.160.0050.03712.67
5.3.150.0090.04112.68
5.3.140.0040.04312.66
5.3.130.0040.04212.66
5.3.120.0030.04212.66
5.3.110.0030.04312.65
5.3.100.0050.05412.12
5.3.90.0050.04312.09
5.3.80.0070.04812.07
5.3.70.0050.03712.08
5.3.60.0090.04012.07
5.3.50.0050.03612.00
5.3.40.0100.03612.00
5.3.30.0040.03611.95
5.3.20.0090.04011.73
5.3.10.0040.03711.69
5.3.00.0030.03911.68
5.2.170.0040.0349.18
5.2.160.0050.0359.18
5.2.150.0020.0499.18
5.2.140.0050.0329.18
5.2.130.0050.0299.14
5.2.120.0060.0299.14
5.2.110.0060.0309.14
5.2.100.0040.0329.14
5.2.90.0090.0299.14
5.2.80.0060.0299.14
5.2.70.0040.0389.14
5.2.60.0040.0329.09
5.2.50.0070.0349.06
5.2.40.0070.0269.03
5.2.30.0070.0339.01
5.2.20.0030.0309.00
5.2.10.0040.0318.92
5.2.00.0040.0358.79
5.1.60.0080.0258.07
5.1.50.0050.0258.06
5.1.40.0020.0258.04
5.1.30.0060.0338.39
5.1.20.0050.0288.42
5.1.10.0050.0308.14
5.1.00.0080.0388.14
5.0.50.0030.0226.63
5.0.40.0020.0206.49
5.0.30.0020.0326.31
5.0.20.0050.0186.27
5.0.10.0020.0226.25
5.0.00.0020.0326.24
4.4.90.0070.0184.78
4.4.80.0030.0164.75
4.4.70.0040.0194.76
4.4.60.0030.0184.76
4.4.50.0020.0204.77
4.4.40.0010.0314.70
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0020.0164.85
4.4.00.0030.0244.75
4.3.110.0030.0164.67
4.3.100.0040.0144.67
4.3.90.0020.0154.64
4.3.80.0010.0284.58
4.3.70.0040.0194.63
4.3.60.0030.0174.63
4.3.50.0010.0174.63
4.3.40.0010.0314.54
4.3.30.0000.0183.30
4.3.20.0010.0173.27
4.3.10.0000.0173.23
4.3.00.0170.0277.18

preferences:
39.71 ms | 401 KiB | 5 Q