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);

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.40.0140.00718.96
8.3.30.0070.00719.31
8.3.20.0070.00020.25
8.3.10.0080.00020.59
8.3.00.0040.00419.63
8.2.170.0140.00722.96
8.2.160.0100.00320.16
8.2.150.0040.01124.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.17
8.2.110.0090.00020.39
8.2.100.0070.00418.16
8.2.90.0030.00519.12
8.2.80.0060.00317.97
8.2.70.0000.00917.88
8.2.60.0000.00918.16
8.2.50.0040.00718.07
8.2.40.0040.00418.21
8.2.30.0040.00419.35
8.2.20.0040.00417.85
8.2.10.0030.00518.07
8.2.00.0030.00617.95
8.1.270.0000.00823.84
8.1.260.0040.00426.35
8.1.250.0070.00728.09
8.1.240.0060.00323.83
8.1.230.0110.00019.10
8.1.220.0030.00717.79
8.1.210.0050.00318.77
8.1.200.0060.00617.48
8.1.190.0030.00617.36
8.1.180.0000.00818.10
8.1.170.0000.00818.75
8.1.160.0000.00822.03
8.1.150.0040.00418.98
8.1.140.0080.00017.71
8.1.130.0000.00717.91
8.1.120.0000.00717.66
8.1.110.0000.00717.56
8.1.100.0050.00217.68
8.1.90.0040.00417.51
8.1.80.0040.00417.58
8.1.70.0070.00017.56
8.1.60.0040.00417.77
8.1.50.0100.00017.57
8.1.40.0060.00317.52
8.1.30.0030.00617.86
8.1.20.0000.00817.79
8.1.10.0040.00417.75
8.1.00.0000.00817.70
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.59
8.0.270.0000.00717.43
8.0.260.0000.00817.30
8.0.250.0030.00317.18
8.0.240.0040.00417.16
8.0.230.0040.00417.11
8.0.220.0030.00517.16
8.0.210.0090.00017.07
8.0.200.0030.00717.07
8.0.190.0050.00317.17
8.0.180.0000.00717.08
8.0.170.0040.00417.00
8.0.160.0040.00417.16
8.0.150.0000.00717.06
8.0.140.0100.00017.10
8.0.130.0000.00513.46
8.0.120.0000.00717.08
8.0.110.0000.00717.18
8.0.100.0000.00816.92
8.0.90.0040.00417.14
8.0.80.0090.00917.08
8.0.70.0020.00517.18
8.0.60.0070.00017.00
8.0.50.0000.00716.98
8.0.30.0080.01517.20
8.0.20.0120.00617.45
8.0.10.0070.00017.06
8.0.00.0110.00717.07
7.4.330.0050.00015.13
7.4.320.0030.00316.66
7.4.300.0030.00316.68
7.4.290.0030.00316.74
7.4.280.0070.00016.66
7.4.270.0080.00016.69
7.4.260.0040.00416.63
7.4.250.0070.00016.70
7.4.240.0020.00616.64
7.4.230.0030.00316.74
7.4.220.0060.01316.64
7.4.210.0130.00316.79
7.4.200.0000.00816.80
7.4.160.0100.00716.83
7.4.150.0140.01017.40
7.4.140.0160.00617.86
7.4.130.0130.00416.69
7.4.120.0070.01116.65
7.4.110.0090.00916.71
7.4.100.0070.01416.47
7.4.90.0120.00616.66
7.4.80.0140.00719.37
7.4.70.0140.00316.55
7.4.60.0140.00416.56
7.4.50.0080.00016.45
7.4.40.0200.00316.70
7.4.30.0060.01116.98
7.4.00.0090.00615.33
7.3.330.0060.00013.25
7.3.320.0000.00513.32
7.3.310.0030.00316.55
7.3.300.0030.00316.41
7.3.290.0030.01016.41
7.3.280.0090.00716.47
7.3.270.0150.00317.40
7.3.260.0090.00916.78
7.3.250.0110.01016.57
7.3.240.0100.00716.76
7.3.230.0130.00416.69
7.3.210.0130.00416.45
7.3.200.0100.00719.39
7.3.190.0130.00316.41
7.3.180.0130.00316.68
7.3.170.0000.01616.54
7.3.160.0000.02116.48
7.2.330.0110.01117.00
7.2.320.0090.00916.62
7.2.310.0040.01716.78
7.2.300.0150.00016.88
7.2.290.0080.00816.71
7.2.00.0130.00319.71
7.1.100.0040.00718.32
7.1.70.0150.00917.42
7.1.60.0160.00619.32
7.1.50.0060.00917.18
7.1.00.0000.08022.30
7.0.200.0000.00916.63
7.0.140.0000.07721.92
7.0.110.0130.07319.84
7.0.100.0130.08719.93
7.0.90.0170.06019.82
7.0.80.0200.06719.90
7.0.70.0070.08719.88
7.0.60.0100.07720.05
7.0.50.0130.06319.92
7.0.40.0070.08019.63
7.0.30.0170.07319.76
7.0.20.0100.08719.70
7.0.10.0130.06019.64
7.0.00.0100.08019.65
5.6.280.0070.06321.10
5.6.260.0130.07720.70
5.6.250.0100.08320.61
5.6.240.0100.08020.52
5.6.230.0100.08320.59
5.6.220.0030.08720.62
5.6.210.0200.06320.55
5.6.200.0100.07720.61
5.6.190.0000.08320.66
5.6.180.0100.07020.79
5.6.170.0070.07720.54
5.6.160.0070.06720.59
5.6.150.0170.07720.47
5.6.140.0070.07020.50
5.6.130.0030.06720.61
5.6.120.0170.07020.58
5.6.110.0100.04720.55
5.6.100.0130.07720.64
5.6.90.0030.08720.61
5.6.80.0070.08019.89
5.6.70.0130.07019.79
5.6.60.0030.06719.79
5.6.50.0030.05020.02
5.6.40.0100.07319.78
5.6.30.0100.08019.96
5.6.20.0030.06719.98
5.6.10.0070.06719.77
5.6.00.0030.07719.95
5.5.380.0030.07720.43
5.5.370.0130.07720.53
5.5.360.0130.06320.19
5.5.350.0070.05020.45
5.5.340.0130.07320.84
5.5.330.0100.07020.76
5.5.320.0100.08020.72
5.5.310.0170.07320.70
5.5.300.0100.07320.78
5.5.290.0070.04720.84
5.5.280.0230.07020.64
5.5.270.0000.08320.91
5.5.260.0070.08320.83
5.5.250.0070.08320.50
5.5.240.0100.05720.34
5.5.230.0070.08020.16
5.5.220.0070.07720.20
5.5.210.0100.04720.24
5.5.200.0130.05719.95
5.5.190.0100.07320.10
5.5.180.0170.05320.03
5.5.160.0030.08720.16
5.5.150.0230.03320.31
5.5.140.0130.07720.29
5.5.130.0100.08020.25
5.5.120.0070.08020.24
5.5.110.0100.08020.24
5.5.100.0100.06719.93
5.5.90.0030.08319.99
5.5.80.0130.07319.99
5.5.70.0030.07319.98
5.5.60.0170.06719.91
5.5.50.0030.05020.00
5.5.40.0070.07720.03
5.5.30.0130.05019.97
5.5.20.0170.06020.18
5.5.10.0070.06720.17
5.5.00.0070.07320.13
5.4.450.0070.08019.40
5.4.440.0100.07019.40
5.4.430.0100.07719.40
5.4.420.0100.07319.48
5.4.410.0100.07719.18
5.4.400.0170.07019.02
5.4.390.0100.07719.00
5.4.380.0130.07319.03
5.4.370.0070.07719.00
5.4.360.0130.06718.95
5.4.350.0030.08319.10
5.4.340.0000.07319.16
5.4.320.0000.08719.01
5.4.310.0100.07018.95
5.4.300.0030.07719.17
5.4.290.0070.08019.10
5.4.280.0030.08018.92
5.4.270.0070.07318.95
5.4.260.0130.06719.27
5.4.250.0030.08019.00
5.4.240.0130.06719.16
5.4.230.0030.07719.24
5.4.220.0070.07319.18
5.4.210.0170.07019.03
5.4.200.0130.06318.93
5.4.190.0000.08318.98
5.4.180.0130.07319.02
5.4.170.0200.06719.26
5.4.160.0130.05719.25
5.4.150.0170.07019.14
5.4.140.0070.07016.27
5.4.130.0100.06016.30
5.4.120.0170.05316.28
5.4.110.0100.03316.50
5.4.100.0070.06716.46
5.4.90.0030.07016.19
5.4.80.0170.05716.32
5.4.70.0070.07316.32
5.4.60.0070.07016.41
5.4.50.0070.06716.38
5.4.40.0200.04016.55
5.4.30.0130.05716.21
5.4.20.0070.07316.55
5.4.10.0130.06716.38
5.4.00.0100.06315.76
5.3.290.0070.07314.57
5.3.280.0070.07714.54
5.3.270.0000.10014.62
5.3.260.0100.07314.40
5.3.250.0130.06714.44
5.3.240.0100.07314.45
5.3.230.0130.07014.62
5.3.220.0100.06714.58
5.3.210.0130.05314.57
5.3.200.0170.06314.67
5.3.190.0070.07014.40
5.3.180.0100.07314.67
5.3.170.0000.07314.66
5.3.160.0070.06714.49
5.3.150.0070.04014.58
5.3.140.0030.06714.48
5.3.130.0130.07014.40
5.3.120.0070.07314.57
5.3.110.0070.07714.57
5.3.100.0070.07013.87
5.3.90.0030.07313.83
5.3.80.0100.07014.04
5.3.70.0030.07713.92
5.3.60.0030.06313.80
5.3.50.0030.07713.88
5.3.40.0130.06714.01
5.3.30.0170.05313.73
5.3.20.0030.06013.57
5.3.10.0100.07013.73
5.3.00.0030.07313.50
5.2.170.0100.05713.01
5.2.160.0030.06013.01
5.2.150.0100.06013.01
5.2.140.0130.05313.01
5.2.130.0030.06313.01
5.2.120.0100.05713.01
5.2.110.0030.06313.01
5.2.100.0030.05313.01
5.2.90.0030.05713.01
5.2.80.0030.06013.01
5.2.70.0100.05713.01
5.2.60.0030.06013.01
5.2.50.0070.06013.01
5.2.40.0030.06013.01
5.2.30.0070.06013.01
5.2.20.0130.05013.01
5.2.10.0030.06313.01
5.2.00.0000.06313.01
5.1.60.0100.04713.01
5.1.50.0130.04713.01
5.1.40.0100.04713.01
5.1.30.0030.06013.01
5.1.20.0030.05713.01
5.1.10.0100.05013.01
5.1.00.0070.05013.01
5.0.50.0030.04713.01
5.0.40.0030.04713.01
5.0.30.0000.07313.01
5.0.20.0030.04313.01
5.0.10.0070.04013.01
5.0.00.0070.05713.01
4.4.90.0000.04013.01
4.4.80.0070.03013.01
4.4.70.0030.02713.01
4.4.60.0000.03313.01
4.4.50.0000.03713.01
4.4.40.0030.05313.01
4.4.30.0070.03013.01
4.4.20.0100.02713.01
4.4.10.0100.03013.01
4.4.00.0030.05313.01
4.3.110.0030.03313.01
4.3.100.0070.03313.01
4.3.90.0030.03713.01
4.3.80.0100.04313.01
4.3.70.0100.02713.01
4.3.60.0070.03013.01
4.3.50.0000.03713.01
4.3.40.0000.05713.01
4.3.30.0030.03313.01
4.3.20.0070.03313.01
4.3.10.0000.03713.01
4.3.00.0000.02713.01

preferences:
39.76 ms | 400 KiB | 5 Q