3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Crea un iterador a limitar $frutas = new ArrayIterator(array( 'manzana', 'banana', 'cereza', 'ciruela', 'baya' )); // Recorre el bucle sólo para las tres primeras frutas foreach (new LimitIterator($frutas, 0, 9) as $fruta) { var_dump($fruta); }

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.0170.00316.50
8.3.50.0070.01122.82
8.3.40.0140.00318.70
8.3.30.0040.01118.95
8.3.20.0040.00420.25
8.3.10.0080.00023.64
8.3.00.0040.00417.38
8.2.180.0040.01116.50
8.2.170.0110.00422.96
8.2.160.0100.00720.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0070.01121.10
8.2.110.0090.00022.29
8.2.100.0060.00617.91
8.2.90.0050.00319.09
8.2.80.0030.00517.97
8.2.70.0030.00617.50
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0080.00019.78
8.2.30.0000.00718.12
8.2.20.0030.00617.75
8.2.10.0050.00317.99
8.2.00.0070.00017.74
8.1.280.0030.01725.92
8.1.270.0140.00324.02
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0040.00723.84
8.1.230.0080.00419.18
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0050.00517.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00018.56
8.1.160.0080.00021.95
8.1.150.0000.00818.88
8.1.140.0000.00717.50
8.1.130.0040.00417.76
8.1.120.0030.00317.39
8.1.110.0000.00817.50
8.1.100.0070.00017.42
8.1.90.0020.00517.42
8.1.80.0070.00017.35
8.1.70.0000.00717.43
8.1.60.0030.00617.55
8.1.50.0030.00517.51
8.1.40.0000.00917.53
8.1.30.0030.00617.55
8.1.20.0040.00417.55
8.1.10.0040.00417.63
8.1.00.0030.00517.49
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0020.00518.44
8.0.270.0050.00217.13
8.0.260.0030.00317.30
8.0.250.0030.00316.93
8.0.240.0000.00716.88
8.0.230.0030.00316.79
8.0.220.0030.00316.93
8.0.210.0000.00716.82
8.0.200.0030.00316.98
8.0.190.0000.00816.87
8.0.180.0030.00316.81
8.0.170.0030.00616.98
8.0.160.0080.00016.85
8.0.150.0000.00716.83
8.0.140.0000.00816.80
8.0.130.0000.00813.28
8.0.120.0040.00416.86
8.0.110.0040.00416.90
8.0.100.0000.00716.80
8.0.90.0030.00316.95
8.0.80.0070.01616.84
8.0.70.0000.00716.67
8.0.60.0040.00416.91
8.0.50.0070.00016.90
8.0.30.0080.01117.06
8.0.20.0130.01317.40
8.0.10.0040.00416.80
8.0.00.0140.00516.76
7.4.330.0000.00615.20
7.4.320.0030.00316.48
7.4.300.0030.00516.42
7.4.290.0040.00416.50
7.4.280.0080.00016.53
7.4.270.0000.00716.63
7.4.260.0030.00316.60
7.4.250.0070.00016.61
7.4.240.0030.00416.55
7.4.230.0000.00716.71
7.4.220.0030.01516.54
7.4.210.0090.00616.68
7.4.200.0000.00716.63
7.4.160.0110.00716.61
7.4.150.0040.02017.40
7.4.140.0090.00917.86
7.4.130.0090.00916.60
7.4.120.0030.01416.44
7.4.110.0060.00916.29
7.4.100.0040.01216.51
7.4.90.0070.01016.52
7.4.80.0130.01019.39
7.4.70.0100.01316.66
7.4.60.0180.00016.36
7.4.50.0090.00016.38
7.4.40.0070.01016.39
7.4.30.0100.00716.43
7.4.00.0090.00614.86
7.3.330.0050.00013.02
7.3.320.0050.00013.10
7.3.310.0070.00016.33
7.3.300.0030.00316.15
7.3.290.0060.00916.20
7.3.280.0080.00916.21
7.3.270.0150.00317.40
7.3.260.0030.01416.18
7.3.250.0110.00616.33
7.3.240.0050.01416.24
7.3.230.0040.01416.46
7.3.210.0130.00716.26
7.3.200.0070.01016.10
7.3.190.0000.02016.55
7.3.180.0060.01516.25
7.3.170.0120.00316.36
7.3.160.0110.00716.19
7.3.10.0080.00816.77
7.3.00.0090.00616.55
7.2.330.0080.01116.66
7.2.320.0070.01016.43
7.2.310.0100.01016.66
7.2.300.0030.01316.56
7.2.290.0060.00916.74
7.2.130.0030.01016.87
7.2.120.0050.00516.93
7.2.110.0030.01016.81
7.2.100.0070.00717.06
7.2.90.0090.00417.06
7.2.80.0120.00016.85
7.2.70.0040.01117.04
7.2.60.0040.00717.07
7.2.50.0110.00416.85
7.2.40.0070.00717.05
7.2.30.0070.00716.91
7.2.20.0100.00316.68
7.2.10.0060.00617.01
7.2.00.0080.00818.14
7.1.250.0030.00615.69
7.1.240.0070.00315.69
7.1.230.0070.00715.64
7.1.220.0030.00615.57
7.1.210.0040.01215.82
7.1.200.0070.00415.68
7.1.190.0000.00815.93
7.1.180.0030.00615.84
7.1.170.0070.00315.64
7.1.160.0070.00315.62
7.1.150.0070.00015.73
7.1.140.0100.00615.70
7.1.130.0060.00915.54
7.1.120.0170.00015.45
7.1.110.0090.00315.86
7.1.100.0050.00816.71
7.1.90.0120.00315.66
7.1.80.0040.00415.86
7.1.70.0040.00716.47
7.1.60.0100.00917.66
7.1.50.0090.00716.29
7.1.40.0070.00415.54
7.1.30.0060.00615.72
7.1.20.0040.00415.44
7.1.10.0030.01215.85
7.1.00.0110.03519.08
7.0.330.0000.01215.52
7.0.320.0000.01015.50
7.0.310.0080.00415.32
7.0.300.0050.00315.33
7.0.290.0030.00615.06
7.0.280.0080.00015.23
7.0.270.0060.00915.45
7.0.260.0070.01015.49
7.0.250.0000.00815.23
7.0.240.0120.00315.41
7.0.230.0140.00015.30
7.0.220.0060.00615.32
7.0.210.0090.00615.35
7.0.200.0020.00815.64
7.0.190.0100.00315.18
7.0.180.0070.00715.24
7.0.170.0070.00715.07
7.0.160.0080.00315.41
7.0.150.0030.00715.38
7.0.140.0040.04118.68
7.0.130.0030.01215.32
7.0.120.0040.01115.45
7.0.110.0070.00315.48
7.0.100.0070.00715.42
7.0.90.0060.00315.20
7.0.80.0030.00915.37
7.0.70.0060.00615.26
7.0.60.0050.03217.68
7.0.50.0140.01716.60
7.0.40.0070.02416.70
7.0.30.0150.04516.75
7.0.20.0160.02816.86
7.0.10.0120.02716.80
7.0.00.0050.02416.79
5.6.380.0090.00314.35
5.6.370.0040.01114.23
5.6.360.0030.01014.39
5.6.350.0000.00714.23
5.6.340.0090.00614.06
5.6.330.0100.00014.08
5.6.320.0030.00914.11
5.6.310.0070.00714.46
5.6.300.0030.00914.27
5.6.290.0130.00014.26
5.6.280.0030.04117.64
5.6.270.0100.00314.23
5.6.260.0100.00314.46
5.6.250.0090.00614.51
5.6.240.0060.00914.21
5.6.230.0060.00914.42
5.6.220.0000.01514.41
5.6.210.0070.04317.47
5.6.200.0040.02716.26
5.6.190.0060.04617.38
5.6.180.1650.02517.48
5.6.170.0170.04217.27
5.6.160.0030.02617.44
5.6.150.0090.04116.14
5.6.140.0070.02316.25
5.6.130.0100.01816.27
5.6.120.0120.04217.75
5.6.110.0070.05217.56
5.6.100.0180.04017.44
5.6.90.0040.04717.56
5.6.80.0120.03917.30
5.6.70.0070.00714.02
5.6.60.0090.00314.14
5.6.50.0060.00614.16
5.6.40.0060.00313.98
5.6.30.0070.00714.18
5.6.20.0120.00414.19
5.6.10.0100.00614.49
5.6.00.0000.01214.17
5.5.380.0060.00611.25
5.5.370.0000.01011.17
5.5.360.0070.00010.86
5.5.350.0170.03515.64
5.5.340.0100.02114.58
5.5.330.0130.03815.56
5.5.320.0130.03315.59
5.5.310.0180.02215.55
5.5.300.0050.02214.42
5.5.290.0070.03414.47
5.5.280.0080.03816.00
5.5.270.0030.04415.76
5.5.260.0000.02515.98
5.5.250.0030.03915.74
5.5.240.0020.04715.43
5.5.230.0060.00610.71
5.5.220.0060.00610.75
5.5.210.0030.00910.84
5.5.200.0030.00310.90
5.5.190.0090.00310.71
5.5.180.0030.00910.71
5.5.170.0090.00310.71
5.5.160.0080.00410.71
5.5.150.0000.00710.71
5.5.140.0040.00710.82
5.5.130.0060.00610.83
5.5.120.0000.00611.12
5.5.110.0030.00911.18
5.5.100.0060.00611.20
5.5.90.0040.00710.84
5.5.80.0060.00611.19
5.5.70.0100.00010.79
5.5.60.0040.00710.98
5.5.50.0000.00610.71
5.5.40.0100.00311.05
5.5.30.0000.00710.87
5.5.20.0070.00010.71
5.5.10.0090.00310.71
5.5.00.0000.01110.81
5.4.450.0350.03815.13
5.4.440.0150.03215.15
5.4.430.0160.03815.27
5.4.420.0120.02915.24
5.4.410.0080.02814.89
5.4.400.0500.03214.76
5.4.390.0580.03214.71
5.4.380.0060.02814.67
5.4.370.0060.02814.83
5.4.360.0220.02314.60
5.4.350.0060.02211.40
5.4.340.0090.02311.34
5.4.330.0030.00710.79
5.4.320.0010.02211.66
5.4.310.0030.02411.65
5.4.300.0060.02011.85
5.4.290.0070.02211.81
5.4.280.0040.02411.64
5.4.270.0040.02311.65
5.4.260.0060.01911.66
5.4.250.0040.02111.56
5.4.240.0050.02111.69
5.4.230.0040.02311.71
5.4.220.0040.02211.55
5.4.210.0060.02311.52
5.4.200.0080.02011.69
5.4.190.0060.02211.52
5.4.180.0060.02111.57
5.4.170.0050.02411.53
5.4.160.0060.02011.53
5.4.150.0040.02311.66
5.4.140.0050.02011.65
5.4.130.0040.02111.48
5.4.120.0040.02511.43
5.4.110.0090.01811.50
5.4.100.0030.02311.44
5.4.90.0050.02111.39
5.4.80.0040.02211.36
5.4.70.0090.01811.34
5.4.60.0050.02211.42
5.4.50.0090.01911.51
5.4.40.0060.01711.40
5.4.30.0060.02311.47
5.4.20.0050.01911.51
5.4.10.0080.01911.44
5.4.00.0080.01911.11
5.3.290.0080.02111.75
5.3.280.0050.02511.71
5.3.270.0040.02111.71
5.3.260.0040.02111.71
5.3.250.0050.02311.71
5.3.240.0050.02011.71
5.3.230.0040.02211.71
5.3.220.0090.02111.70
5.3.210.0060.02811.69
5.3.200.0040.02611.70
5.3.190.0040.02411.69
5.3.180.0040.02411.69
5.3.170.0070.02011.69
5.3.160.0050.02311.69
5.3.150.0020.02411.69
5.3.140.0020.02211.68
5.3.130.0030.02911.68
5.3.120.0060.02211.68
5.3.110.0060.02111.68
5.3.100.0040.02311.41
5.3.90.0050.02711.40
5.3.80.0030.02311.39
5.3.70.0060.02211.39
5.3.60.0030.02211.39
5.3.50.0040.02311.35
5.3.40.0030.02011.35
5.3.30.0040.02011.32
5.3.20.0050.02011.21
5.3.10.0070.02211.20
5.3.00.0050.02211.19
5.2.170.0050.0189.94
5.2.160.0020.0219.94
5.2.150.0030.0199.94
5.2.140.0070.0149.94
5.2.130.0040.0189.92
5.2.120.0050.0179.92
5.2.110.0060.0189.92
5.2.100.0050.0159.92
5.2.90.0020.0219.92
5.2.80.0100.0149.92
5.2.70.0040.0189.92
5.2.60.0060.0159.90
5.2.50.0040.0179.88
5.2.40.0020.0199.87
5.2.30.0070.0159.86
5.2.20.0060.0159.85
5.2.10.0050.0169.81
5.2.00.0080.0149.74
5.1.60.0040.0159.38
5.1.50.0040.0139.38
5.1.40.0010.0179.38
5.1.30.0020.0169.55
5.1.20.0050.0159.56
5.1.10.0050.0169.42
5.1.00.0030.0169.42
5.0.50.0020.0148.66
5.0.40.0060.0098.59
5.0.30.0040.0208.50
5.0.20.0020.0148.48
5.0.10.0020.0138.47
5.0.00.0050.0188.47
4.4.90.0020.0107.74
4.4.80.0020.0097.73
4.4.70.0050.0087.73
4.4.60.0040.0117.73
4.4.50.0030.0117.74
4.4.40.0010.0207.71
4.4.30.0010.0147.73
4.4.20.0010.0117.78
4.4.10.0020.0107.78
4.4.00.0040.0127.73
4.3.110.0020.0107.69
4.3.100.0040.0097.69
4.3.90.0030.0107.67
4.3.80.0010.0157.64
4.3.70.0040.0097.67
4.3.60.0020.0107.67
4.3.50.0020.0097.67
4.3.40.0030.0157.62
4.3.30.0020.0097.00
4.3.20.0020.0106.98
4.3.10.0020.0106.96
4.3.00.0070.0128.92

preferences:
43.67 ms | 401 KiB | 5 Q