3v4l.org

run code in 300+ PHP versions simultaneously
<?php // define nested array $data = array("United States",array("Texas", "Philadelphia"),array("California",array ("Los Angeles", "San Francisco"))); // initialize an Iterator // pass it the array to be processed $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($data)); // iterate over the array // result: "UNITED STATES TEXAS PHILADELPHIA CALIFORNIA LOS ANGELES SAN FRANCISCO" foreach ($iterator as $value) { print strtoupper($value); }

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.0070.00716.38
8.3.50.0110.01017.60
8.3.40.0100.00718.54
8.3.30.0090.00618.43
8.3.20.0040.00418.41
8.3.10.0040.00418.60
8.3.00.0030.00519.25
8.2.180.0090.00616.63
8.2.170.0150.00322.96
8.2.160.0140.00021.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0030.00520.89
8.2.110.0080.00420.97
8.2.100.0080.00417.72
8.2.90.0000.00819.35
8.2.80.0040.00419.41
8.2.70.0040.00417.25
8.2.60.0080.00317.93
8.2.50.0030.00718.07
8.2.40.0040.00418.34
8.2.30.0080.00018.08
8.2.20.0000.00917.59
8.2.10.0050.00317.75
8.2.00.0040.00417.73
8.1.280.0140.00725.92
8.1.270.0110.00423.99
8.1.260.0060.00326.35
8.1.250.0000.00928.09
8.1.240.0090.00023.96
8.1.230.0060.00620.89
8.1.220.0000.00817.74
8.1.210.0030.00519.02
8.1.200.0000.00917.23
8.1.190.0000.00717.53
8.1.180.0050.00318.10
8.1.170.0000.01118.84
8.1.160.0040.00418.81
8.1.150.0070.00018.63
8.1.140.0050.00217.37
8.1.130.0000.00717.84
8.1.120.0070.00017.54
8.1.110.0040.00417.45
8.1.100.0000.00717.35
8.1.90.0050.00217.36
8.1.80.0070.00017.50
8.1.70.0030.00317.27
8.1.60.0000.00817.59
8.1.50.0060.00317.38
8.1.40.0080.00017.42
8.1.30.0000.00817.48
8.1.20.0070.00017.54
8.1.10.0030.00517.48
8.1.00.0000.01017.45
8.0.300.0040.00420.09
8.0.290.0040.00416.63
8.0.280.0070.00018.45
8.0.270.0030.00317.22
8.0.260.0030.00316.70
8.0.250.0040.00416.98
8.0.240.0000.00716.85
8.0.230.0000.00717.00
8.0.220.0070.00016.76
8.0.210.0000.00716.89
8.0.200.0070.00016.89
8.0.190.0000.00716.96
8.0.180.0000.00716.93
8.0.170.0060.00316.81
8.0.160.0030.00316.86
8.0.150.0040.00416.85
8.0.140.0030.00616.84
8.0.130.0030.00313.36
8.0.120.0040.00416.76
8.0.110.0070.00016.83
8.0.100.0050.00216.92
8.0.90.0080.00016.93
8.0.80.0110.00416.86
8.0.70.0000.00816.84
8.0.60.0080.00016.70
8.0.50.0000.00716.89
8.0.30.0140.00417.16
8.0.20.0160.01117.04
8.0.10.0000.00817.14
8.0.00.0090.01216.77
7.4.330.0050.00012.98
7.4.320.0030.00316.53
7.4.300.0000.00616.61
7.4.290.0000.00716.52
7.4.280.0000.00816.40
7.4.270.0030.00616.61
7.4.260.0000.00513.29
7.4.250.0040.00416.49
7.4.240.0020.00516.57
7.4.230.0000.00716.69
7.4.220.0130.01316.56
7.4.210.0110.00516.60
7.4.200.0030.00316.58
7.4.190.0070.00016.52
7.4.160.0120.00816.31
7.4.150.0170.00016.45
7.4.140.0060.01116.54
7.4.130.0110.00616.43
7.4.120.0040.01316.35
7.4.110.0100.00716.45
7.4.100.0170.00316.55
7.4.90.0070.01116.57
7.4.80.0060.01519.39
7.4.70.0090.00616.49
7.4.60.0100.00516.53
7.4.50.0080.00416.46
7.4.40.0040.01416.56
7.4.30.0120.00616.63
7.4.00.0040.01115.05
7.3.330.0030.00313.16
7.3.320.0000.00513.19
7.3.310.0070.00016.14
7.3.300.0030.00316.18
7.3.290.0030.01516.22
7.3.280.0090.01016.31
7.3.270.0100.00716.41
7.3.260.0060.01316.41
7.3.250.0110.00616.54
7.3.240.0160.00616.30
7.3.230.0120.00616.47
7.3.210.0060.00916.21
7.3.200.0040.01516.25
7.3.190.0120.00816.39
7.3.180.0060.01016.52
7.3.170.0100.00716.32
7.3.160.0090.01216.66
7.3.120.0080.00414.85
7.2.330.0130.00616.80
7.2.320.0100.00616.34
7.2.310.0030.01416.74
7.2.300.0130.01016.50
7.2.290.0100.00716.76
7.2.00.0070.00719.20
7.1.200.0090.00615.52
7.1.100.0220.00518.03
7.1.70.0000.00917.16
7.1.60.0070.01719.40
7.1.50.0140.01117.04
7.1.00.0100.06722.35
7.0.200.0100.01015.01
7.0.140.0030.07322.09
7.0.120.0100.04722.16
7.0.60.0030.04019.93
7.0.50.0030.06317.78
7.0.40.0100.06017.70
7.0.30.0170.05317.80
7.0.20.0100.08317.70
7.0.10.0070.04717.67
7.0.00.0070.07317.75
5.6.210.0070.07720.50
5.6.200.0070.07718.13
5.6.190.0070.08018.19
5.6.180.0070.08018.12
5.6.170.0070.06318.18
5.6.160.0070.08318.18
5.6.150.0030.06018.22
5.6.140.0000.05318.07
5.6.130.0070.06018.18
5.6.120.0030.04318.14
5.6.110.0000.05318.20
5.6.100.0100.07718.20
5.6.90.0130.07318.20
5.6.80.0130.08017.50
5.6.70.0030.08317.56
5.6.60.0070.07017.41
5.6.50.0030.08317.50
5.6.40.0100.06017.59
5.6.30.0130.07317.58
5.6.20.0030.06017.43
5.6.10.0030.08317.56
5.6.00.0070.08317.55
5.5.350.0030.08720.32
5.5.340.0030.07718.02
5.5.330.0130.03717.98
5.5.320.0130.07717.98
5.5.310.0070.07717.90
5.5.300.0130.07317.95
5.5.290.0070.04017.89
5.5.280.0200.06017.97
5.5.270.0070.08318.00
5.5.260.0100.08318.00
5.5.250.0070.04017.81
5.5.240.0000.08717.40
5.5.230.0070.07717.38
5.5.220.0070.07717.30
5.5.210.0100.07317.23
5.5.200.0030.07717.36
5.5.190.0100.07017.37
5.5.180.0070.06017.34
5.5.160.0100.08317.31
5.5.150.0130.07017.29
5.5.140.0070.04017.30
5.5.130.0100.05717.23
5.5.120.0070.03717.26
5.5.110.0070.04317.32
5.5.100.0070.05017.13
5.5.90.0030.03717.18
5.5.80.0030.03717.16
5.5.70.0070.07717.20
5.5.60.0000.04317.16
5.5.50.0070.03317.26
5.5.40.0000.04017.25
5.5.30.0030.03717.25
5.5.20.0070.03317.11
5.5.10.0000.04017.15
5.5.00.0030.03717.14
5.4.450.0030.08719.32
5.4.440.0070.07019.45
5.4.430.0100.07719.45
5.4.420.0170.05319.39
5.4.410.0030.04719.26
5.4.400.0030.06719.07
5.4.390.0070.05718.82
5.4.380.0100.05318.99
5.4.370.0000.08018.98
5.4.360.0070.07718.98
5.4.350.0000.07719.02
5.4.340.0100.07319.10
5.4.320.0130.06718.98
5.4.310.0100.03718.88
5.4.300.0070.04018.88
5.4.290.0030.08019.00
5.4.280.0100.06718.98
5.4.270.0000.04019.02
5.4.260.0000.05718.97
5.4.250.0130.03019.12
5.4.240.0100.07319.02
5.4.230.0000.06019.04
5.4.220.0030.07719.02
5.4.210.0030.05018.98
5.4.200.0070.03319.00
5.4.190.0070.03718.97
5.4.180.0070.03318.96
5.4.170.0000.04018.97
5.4.160.0000.04018.93
5.4.150.0070.03318.80
5.4.140.0030.03316.13
5.4.130.0100.03716.16
5.4.120.0000.03716.28
5.4.110.0030.04016.23
5.4.100.0030.03316.27
5.4.90.0030.03316.18
5.4.80.0070.03016.35
5.4.70.0070.03016.24
5.4.60.0170.02716.25
5.4.50.0070.03316.25
5.4.40.0100.04316.28
5.4.30.0000.03716.22
5.4.20.0030.04016.54
5.4.10.0100.02716.38
5.4.00.0070.03015.71
5.3.290.0030.06014.64
5.3.280.0030.05714.59
5.3.270.0000.04014.54
5.3.260.0000.04014.57
5.3.250.0070.03314.38
5.3.240.0000.04014.55
5.3.230.0070.03314.56
5.3.220.0030.03714.53
5.3.210.0000.04014.39
5.3.200.0130.02314.53
5.3.190.0000.04314.55
5.3.180.0030.03714.53
5.3.170.0000.04314.38
5.3.160.0000.04014.48
5.3.150.0000.03714.53
5.3.140.0000.03714.52
5.3.130.0030.04314.52
5.3.120.0000.04314.48
5.3.110.0070.03314.51
5.3.100.0000.04013.99
5.3.90.0030.03313.99
5.3.80.0070.03013.94
5.3.70.0000.04013.93
5.3.60.0000.03713.95
5.3.50.0030.03313.91
5.3.40.0030.03313.90
5.3.30.0070.03313.88
5.3.20.0000.04313.66
5.3.10.0030.03313.57
5.3.00.0070.03013.61
5.2.170.0030.03711.13
5.2.160.0070.02711.06
5.2.150.0030.02711.13
5.2.140.0030.02711.13
5.2.130.0070.02310.92
5.2.120.0030.02711.11
5.2.110.0000.03711.13
5.2.100.0000.03011.07
5.2.90.0030.03711.00
5.2.80.0130.05711.04
5.2.70.0030.05011.01
5.2.60.0200.04310.83
5.2.50.0100.05711.16
5.2.40.0030.06310.78
5.2.30.0070.06010.87
5.2.20.0100.04310.89
5.2.10.0000.04710.86
5.2.00.0030.06010.56
5.1.60.0000.05010.02
5.1.50.0070.04010.02
5.1.40.0100.0339.88
5.1.30.0070.05710.22
5.1.20.0100.04010.25
5.1.10.0030.05710.03
5.1.00.0070.05310.00
5.0.50.0030.0508.61
5.0.40.0030.0478.44
5.0.30.0070.0608.16
5.0.20.0000.0408.15
5.0.10.0070.0408.22
5.0.00.0070.0608.14
4.4.90.0100.0307.74
4.4.80.0000.0337.74
4.4.70.0100.0307.74
4.4.60.0000.0337.74
4.4.50.0030.0337.74
4.4.40.0070.0307.74
4.4.30.0000.0237.74
4.4.20.0100.0277.74
4.4.10.0030.0277.74
4.4.00.0000.0607.74
4.3.110.0030.0337.74
4.3.100.0000.0377.74
4.3.90.0000.0277.74
4.3.80.0030.0307.74
4.3.70.0030.0277.74
4.3.60.0030.0207.74
4.3.50.0000.0237.74
4.3.40.0000.0537.74
4.3.30.0000.0337.74
4.3.20.0030.0207.74
4.3.10.0000.0207.74
4.3.00.0000.0207.74

preferences:
55.06 ms | 401 KiB | 5 Q