3v4l.org

run code in 300+ PHP versions simultaneously
<?php function print_caps(Iterator $iterator) { echo strtoupper($iterator->current()) . "\n"; return TRUE; } $it = new ArrayIterator(array("Apples", "Bananas", "Cherries")); iterator_apply($it, "print_caps", array($it));

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.0150.00018.67
8.3.30.0150.00620.22
8.3.20.0040.00420.09
8.3.10.0160.00021.94
8.3.00.0070.00022.34
8.2.170.0000.01422.96
8.2.160.0150.00020.18
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0000.00721.13
8.2.110.0080.00022.23
8.2.100.0090.00419.45
8.2.90.0030.00619.35
8.2.80.0000.00718.96
8.2.70.0000.01117.50
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0070.00018.28
8.2.30.0000.00717.99
8.2.20.0040.00417.71
8.2.10.0070.00017.67
8.2.00.0090.00317.63
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.61
8.1.230.0070.00319.01
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0000.00817.59
8.1.180.0050.00319.01
8.1.170.0000.00818.55
8.1.160.0040.00422.13
8.1.150.0040.00418.74
8.1.140.0000.00817.41
8.1.130.0030.00317.80
8.1.120.0000.00717.52
8.1.110.0040.00417.46
8.1.100.0040.00417.46
8.1.90.0040.00417.48
8.1.80.0040.00417.45
8.1.70.0000.00717.46
8.1.60.0030.00517.49
8.1.50.0040.00417.43
8.1.40.0070.00017.41
8.1.30.0000.00817.59
8.1.20.0040.00417.65
8.1.10.0000.00717.59
8.1.00.0000.00717.53
8.0.300.0000.00818.77
8.0.290.0060.00317.18
8.0.280.0070.00018.31
8.0.270.0050.00217.32
8.0.260.0060.00016.74
8.0.250.0030.00316.98
8.0.240.0060.00617.02
8.0.230.0000.00717.02
8.0.220.0040.00416.95
8.0.210.0080.00016.99
8.0.200.0030.00316.87
8.0.190.0070.00016.98
8.0.180.0070.00016.97
8.0.170.0000.00716.93
8.0.160.0040.00416.86
8.0.150.0000.00716.89
8.0.140.0000.00716.95
8.0.130.0050.00313.44
8.0.120.0040.00615.07
8.0.110.0020.00715.12
8.0.100.0070.00215.17
8.0.90.0050.00415.05
8.0.80.0060.00615.18
8.0.70.0070.00215.05
8.0.60.0060.00415.12
8.0.50.0080.00215.12
8.0.30.0110.00515.75
8.0.20.0090.00716.09
8.0.10.0000.00715.18
8.0.00.0110.00315.68
7.4.330.0050.00015.09
7.4.320.0070.00016.60
7.4.300.0000.00716.48
7.4.290.0000.00716.61
7.4.280.0000.00816.58
7.4.270.0020.00516.50
7.4.260.0040.00413.26
7.4.250.0040.00514.85
7.4.240.0020.00615.38
7.4.230.0030.00514.92
7.4.220.0060.01114.88
7.4.210.0050.00815.89
7.4.200.0040.00414.86
7.4.190.0040.00415.01
7.4.180.0040.00213.31
7.4.160.0070.00414.86
7.4.150.0050.00615.29
7.4.140.0060.01316.31
7.4.130.0100.00615.37
7.4.120.0070.00815.41
7.4.110.0130.00314.79
7.4.100.0090.00814.95
7.4.90.0060.01014.77
7.4.80.0110.00516.25
7.4.70.0100.00514.83
7.4.60.0080.00714.94
7.4.50.0060.00214.62
7.4.40.0070.00317.94
7.4.30.0100.00514.91
7.4.20.0080.00313.12
7.4.10.0080.00413.15
7.4.00.0070.00814.42
7.3.330.0060.00013.28
7.3.320.0020.00613.20
7.3.310.0020.00814.63
7.3.300.0020.00814.68
7.3.290.0040.01314.84
7.3.280.0090.00715.56
7.3.270.0080.00715.35
7.3.260.0060.01114.76
7.3.250.0080.00715.33
7.3.240.0120.00314.75
7.3.230.0080.00714.82
7.3.220.0090.00513.22
7.3.210.0110.00414.79
7.3.200.0050.00916.24
7.3.190.0050.01314.75
7.3.180.0100.00414.73
7.3.170.0130.00514.82
7.3.160.0100.00314.87
7.3.150.0040.00513.26
7.3.140.0060.00413.17
7.3.130.0030.00313.02
7.3.120.0030.01114.34
7.3.110.0040.00914.15
7.3.100.0040.00814.23
7.3.90.0090.00614.33
7.3.80.0050.00814.30
7.3.70.0080.00414.32
7.3.60.0070.00514.27
7.3.50.0070.00314.29
7.3.40.0070.00414.30
7.3.30.0060.00514.31
7.3.20.0050.00516.14
7.3.10.0080.00816.14
7.3.00.0040.01016.14
7.2.340.0080.00413.28
7.2.330.0030.01314.92
7.2.320.0120.00414.93
7.2.310.0100.00714.82
7.2.300.0070.00915.08
7.2.290.0080.00614.98
7.2.280.0040.00813.36
7.2.270.0130.00013.25
7.2.260.0130.00013.17
7.2.250.0080.00714.14
7.2.240.0060.00814.36
7.2.230.0050.00914.43
7.2.220.0080.00414.44
7.2.210.0070.00514.42
7.2.200.0060.00714.48
7.2.190.0040.01114.46
7.2.180.0070.00514.27
7.2.170.0040.00914.45
7.2.160.0050.00814.21
7.2.150.0080.00615.96
7.2.140.0100.00215.90
7.2.130.0080.00716.42
7.2.120.0050.01016.27
7.2.110.0100.00616.20
7.2.100.0060.01016.18
7.2.90.0080.00816.24
7.2.80.0090.00716.30
7.2.70.0110.00816.36
7.2.60.0110.00916.42
7.2.50.0100.00616.39
7.2.40.0100.00816.50
7.2.30.0080.00716.30
7.2.20.0100.00916.37
7.2.10.0100.00816.44
7.2.00.0070.00917.12
7.1.330.0090.00615.38
7.1.320.0080.00715.20
7.1.310.0050.00615.32
7.1.300.0070.00615.30
7.1.290.0060.00615.28
7.1.280.0100.00515.22
7.1.270.0080.00515.28
7.1.260.0050.00715.39
7.1.250.0070.00815.09
7.1.240.0090.00314.14
7.1.230.0100.00214.25
7.1.220.0070.00514.37
7.1.210.0080.00514.31
7.1.200.0060.00715.09
7.1.190.0070.00514.15
7.1.180.0090.00214.36
7.1.170.0090.00615.06
7.1.160.0100.00515.12
7.1.150.0070.00814.99
7.1.140.0060.00915.07
7.1.130.0120.00315.06
7.1.120.0090.00515.08
7.1.110.0050.01015.02
7.1.100.0080.00615.97
7.1.90.0070.00715.93
7.1.80.0080.00515.79
7.1.70.0060.00615.96
7.1.60.0490.00825.14
7.1.50.0120.01124.87
7.1.40.0180.00827.48
7.1.30.0150.00827.60
7.1.20.0190.00927.51
7.1.10.0090.00515.42
7.1.00.0090.01417.25
7.0.330.0120.00014.25
7.0.320.0110.00014.20
7.0.310.0050.00714.25
7.0.300.0080.00714.72
7.0.290.0120.00614.78
7.0.280.0110.00014.27
7.0.270.0120.00514.78
7.0.260.0060.00914.63
7.0.250.0060.00814.97
7.0.240.0150.00114.92
7.0.230.0730.00815.71
7.0.220.0650.00915.12
7.0.210.0090.00515.41
7.0.200.0090.00415.79
7.0.190.0080.00715.39
7.0.180.0090.00615.24
7.0.170.0080.00715.37
7.0.160.0140.00415.32
7.0.150.0050.01015.25
7.0.140.0060.02416.91
7.0.130.0120.00215.34
7.0.120.0070.00715.36
7.0.110.0090.00615.28
7.0.100.0080.00615.33
7.0.90.0110.00415.32
7.0.80.0070.00815.34
7.0.70.0070.00715.22
7.0.60.0100.01916.42
7.0.50.0130.01915.96
7.0.40.0110.02416.64
7.0.30.0120.02416.63
7.0.20.0110.01816.48
7.0.10.0050.02816.56
7.0.00.0090.02316.54
5.6.400.0060.00612.51
5.6.390.0060.00612.68
5.6.380.0090.00212.71
5.6.370.0090.00212.53
5.6.360.0090.00212.69
5.6.350.0070.00512.70
5.6.340.0110.00012.83
5.6.330.0060.00612.75
5.6.320.0120.00012.70
5.6.310.0060.00612.47
5.6.300.0110.02215.95
5.6.290.0130.02115.84
5.6.280.0100.03417.28
5.6.270.0090.02315.87
5.6.260.0080.02415.93
5.6.250.0110.02215.91
5.6.240.0130.02215.88
5.6.230.0070.02615.92
5.6.220.0100.03115.93
5.6.210.0100.02617.09
5.6.200.0120.03516.45
5.6.190.0090.02917.07
5.6.180.0220.03017.12
5.6.170.0150.02917.15
5.6.160.0120.03517.12
5.6.150.0110.02516.50
5.6.140.0100.03416.59
5.6.130.0120.02916.57
5.6.120.0100.03917.14
5.6.110.0080.04217.13
5.6.100.0120.03617.19
5.6.90.0100.02617.27
5.6.80.0090.03316.88
5.6.70.0090.02515.92
5.6.60.0110.02215.83
5.6.50.0100.02215.70
5.6.40.0080.02415.78
5.6.30.0110.02115.60
5.6.20.0140.02115.68
5.6.10.0050.02615.63
5.6.00.0090.02115.62
5.5.380.0080.02113.67
5.5.370.0070.02413.76
5.5.360.0090.02513.81
5.5.350.1160.02915.35
5.5.340.0110.03514.91
5.5.330.0110.03815.63
5.5.320.0120.03015.44
5.5.310.0080.03015.46
5.5.300.0120.02814.97
5.5.290.0090.03614.96
5.5.280.0130.03415.67
5.5.270.0120.02715.56
5.5.260.0120.02315.58
5.5.250.0110.02915.59
5.5.240.0070.02915.30
5.5.230.0120.01913.69
5.5.220.0120.01913.60
5.5.210.0090.02113.73
5.5.200.0130.01713.53
5.5.190.0070.02413.55
5.5.180.0090.02913.86
5.5.170.0100.00012.46
5.5.160.0100.01813.67
5.5.150.0130.01913.78
5.5.140.0110.01713.61
5.5.130.0070.02213.62
5.5.120.0120.01613.64
5.5.110.0100.02013.73
5.5.100.0110.02313.79
5.5.90.0120.01613.62
5.5.80.0060.02213.61
5.5.70.0060.02213.81
5.5.60.0090.02013.70
5.5.50.0080.01913.49
5.5.40.0100.02213.65
5.5.30.0090.02113.59
5.5.20.0070.02213.68
5.5.10.0110.01913.64
5.5.00.0090.02113.78
5.4.450.0130.02915.62
5.4.440.0100.03615.63
5.4.430.0280.03115.64
5.4.420.0270.02815.67
5.4.410.0310.02415.59
5.4.400.0340.02415.47
5.4.390.0230.03115.57
5.4.380.0140.02615.28
5.4.370.0150.02115.44
5.4.360.0110.02715.25
5.4.350.0070.02613.73
5.4.340.0100.02813.61
5.4.330.0110.00012.48
5.4.320.0090.02413.86
5.4.310.0070.02913.87
5.4.300.0080.02513.81
5.4.290.0070.02713.83
5.4.280.0070.02613.90
5.4.270.0070.02713.77
5.4.260.0100.02413.74
5.4.250.0100.02915.33
5.4.240.0080.02815.51
5.4.230.0090.02715.31
5.4.220.0080.02915.34
5.4.210.0100.02615.27
5.4.200.0100.03215.37
5.4.190.0110.03015.36
5.4.180.0100.02715.36
5.4.170.0090.02815.38
5.4.160.0090.02715.35
5.4.150.0070.03115.37
5.4.140.0120.02614.04
5.4.130.0120.02514.14
5.4.120.0070.03014.10
5.4.110.0100.02514.26
5.4.100.0100.02514.13
5.4.90.0070.02914.20
5.4.80.0120.02414.21
5.4.70.0080.02614.23
5.4.60.0120.02314.18
5.4.50.0050.02914.16
5.4.40.0110.02914.26
5.4.30.0090.02514.14
5.4.20.0090.02714.17
5.4.10.0080.02814.25
5.4.00.0110.02413.88
5.3.290.0100.02512.92
5.3.280.0080.02813.27
5.3.270.0070.02913.26
5.3.260.0130.02413.28
5.3.250.0100.02613.28
5.3.240.0070.02913.16
5.3.230.0100.02713.14
5.3.220.0090.02713.09
5.3.210.0130.02713.00
5.3.200.0120.02313.14
5.3.190.0070.03113.11
5.3.180.0080.02713.18
5.3.170.0090.02713.28
5.3.160.0080.02813.24
5.3.150.0080.02913.30
5.3.140.0110.02513.20
5.3.130.0080.02913.27
5.3.120.0050.03313.16
5.3.110.0080.02813.16
5.3.100.0080.02712.95
5.3.90.0110.02912.90
5.3.80.0080.02712.87
5.3.70.0060.02912.99
5.3.60.0090.02712.92
5.3.50.0070.02812.87
5.3.40.0060.02912.80
5.3.30.0090.02512.80
5.3.20.0060.02812.78
5.3.10.0130.02112.66
5.3.00.0100.02512.71

preferences:
46.97 ms | 400 KiB | 5 Q