3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MaxArray($arr) { $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr)); $it->next(); $max = $it->current(); foreach($it as $v) if ( $v > $max ) $max = $v; return $max; } echo MaxArray(array('121','414'),'12','515',array('122',array('646','4241')));

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.0130.00318.18
8.3.50.0130.01021.94
8.3.40.0070.00718.67
8.3.30.0150.00618.92
8.3.20.0030.00520.24
8.3.10.0080.00021.95
8.3.00.0080.00022.21
8.2.180.0110.00316.47
8.2.170.0070.00722.96
8.2.160.0080.00520.82
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0090.00019.23
8.2.110.0090.00022.26
8.2.100.0060.00617.79
8.2.90.0080.00019.16
8.2.80.0030.00617.97
8.2.70.0110.00017.38
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0030.00618.06
8.2.30.0000.00818.02
8.2.20.0040.00417.53
8.2.10.0060.00317.63
8.2.00.0040.00417.68
8.1.280.0040.01125.92
8.1.270.0100.00024.02
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00623.84
8.1.230.0070.00319.10
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0030.00717.22
8.1.190.0080.00017.41
8.1.180.0050.00318.10
8.1.170.0050.00318.46
8.1.160.0000.00722.02
8.1.150.0090.00018.52
8.1.140.0000.00817.49
8.1.130.0040.00417.83
8.1.120.0040.00417.41
8.1.110.0020.00517.44
8.1.100.0030.00517.45
8.1.90.0040.00417.48
8.1.80.0000.00717.42
8.1.70.0040.00417.44
8.1.60.0090.00017.64
8.1.50.0000.00817.56
8.1.40.0000.00717.46
8.1.30.0030.00517.54
8.1.20.0000.00817.66
8.1.10.0040.00417.49
8.1.00.0080.00017.50
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0040.00418.45
8.0.270.0070.00017.28
8.0.260.0030.00716.69
8.0.250.0000.01016.95
8.0.240.0060.00316.95
8.0.230.0030.00316.89
8.0.220.0000.00716.87
8.0.210.0030.00316.86
8.0.200.0030.00316.98
8.0.190.0000.00816.94
8.0.180.0040.00416.95
8.0.170.0040.00416.81
8.0.160.0000.00716.90
8.0.150.0030.00316.86
8.0.140.0050.00316.91
8.0.130.0000.00613.34
8.0.120.0030.00516.85
8.0.110.0040.00416.83
8.0.100.0040.00416.76
8.0.90.0040.00416.96
8.0.80.0060.01216.84
8.0.70.0070.00016.73
8.0.60.0000.00816.78
8.0.50.0070.00016.93
8.0.30.0130.00717.16
8.0.20.0130.00717.40
8.0.10.0050.00316.89
8.0.00.0100.01116.79
7.4.330.0000.00515.14
7.4.320.0000.00616.62
7.4.300.0060.00016.60
7.4.290.0020.00516.52
7.4.280.0070.00016.58
7.4.270.0070.00016.60
7.4.260.0000.00816.58
7.4.250.0030.00316.39
7.4.240.0030.00416.52
7.4.230.0030.00316.50
7.4.220.0030.01316.69
7.4.210.0090.00916.55
7.4.200.0050.00216.40
7.4.190.0000.00816.32
7.4.160.0130.00316.45
7.4.150.0100.00717.40
7.4.140.0130.00817.86
7.4.130.0120.00516.67
7.4.120.0070.01216.48
7.4.110.0060.01016.55
7.4.100.0060.01116.50
7.4.90.0100.00616.49
7.4.80.0100.00716.70
7.4.70.0060.00916.47
7.4.60.0110.00516.52
7.4.50.0040.00416.34
7.4.40.0060.01222.77
7.4.30.0040.01116.41
7.4.00.0060.01215.11
7.3.330.0000.00513.33
7.3.320.0050.00013.14
7.3.310.0070.00016.27
7.3.300.0030.00316.30
7.3.290.0070.00716.43
7.3.280.0100.00816.36
7.3.270.0090.00917.40
7.3.260.0070.01016.53
7.3.250.0120.00816.43
7.3.240.0100.01216.57
7.3.230.0110.00616.39
7.3.210.0060.01616.35
7.3.200.0150.00719.39
7.3.190.0040.01416.58
7.3.180.0040.01216.35
7.3.170.0060.00916.53
7.3.160.0070.01016.33
7.3.120.0060.00915.07
7.3.10.0030.00916.51
7.3.00.0070.00416.56
7.2.330.0070.01016.64
7.2.320.0090.00916.52
7.2.310.0140.00316.59
7.2.300.0060.01116.56
7.2.290.0030.01316.71
7.2.130.0030.01016.68
7.2.120.0000.01116.92
7.2.110.0040.00416.39
7.2.100.0130.00316.62
7.2.90.0040.00816.71
7.2.80.0070.00716.79
7.2.70.0060.00616.94
7.2.60.0050.00516.71
7.2.50.0030.00716.77
7.2.40.0050.00517.02
7.2.30.0050.00516.86
7.2.20.0000.01317.12
7.2.10.0060.00617.01
7.2.00.0030.00716.88
7.1.250.0030.00715.78
7.1.200.0030.01015.81
7.1.100.0030.01218.14
7.1.70.0030.00517.20
7.1.60.0120.01219.82
7.1.50.0070.01417.05
7.1.00.0030.07722.40
7.0.200.0070.00716.84
7.0.140.0030.07322.05
7.0.60.0000.04319.93
7.0.50.0030.06017.84
7.0.40.0070.07720.11
7.0.30.0470.04720.25
7.0.20.0400.07720.26
7.0.10.0100.04320.17
7.0.00.0070.09020.30
5.6.280.0030.07321.11
5.6.210.0130.07320.75
5.6.200.0200.06718.19
5.6.190.0000.04720.61
5.6.180.3070.04720.61
5.6.170.0300.07320.53
5.6.160.0130.07320.55
5.6.150.0070.08318.29
5.6.140.0000.04318.23
5.6.130.0100.04318.12
5.6.120.0070.04720.99
5.6.110.0170.07021.00
5.6.100.0230.07721.08
5.6.90.0130.04721.00
5.6.80.0070.08720.38
5.5.350.0200.05720.45
5.5.340.0000.04018.05
5.5.330.0130.03320.21
5.5.320.0170.06720.32
5.5.310.0230.03720.32
5.5.300.0070.05018.01
5.5.290.0070.05017.98
5.5.280.0030.05020.88
5.5.270.0100.08020.79
5.5.260.0200.07320.76
5.5.250.0000.04320.61
5.5.240.4070.03720.19
5.4.450.0270.04719.48
5.4.440.0370.05019.19
5.4.430.0570.04319.54
5.4.420.0200.03019.52
5.4.410.0070.05718.73
5.4.400.0100.05318.79
5.4.390.0070.05718.80
5.4.380.0170.05718.79
5.4.370.0330.05018.63
5.4.360.0370.05018.79
5.4.350.0330.05018.59
5.4.340.0300.06018.80
5.4.320.0060.03612.50
5.4.310.0080.05412.50
5.4.300.0060.03612.51
5.4.290.0080.03612.50
5.4.280.0050.03512.40
5.4.270.0090.03612.40
5.4.260.0060.03712.40
5.4.250.0060.03712.40
5.4.240.0100.03312.40
5.4.230.0070.03712.39
5.4.220.0080.03412.39
5.4.210.0060.03512.39
5.4.200.0110.04512.39
5.4.190.0140.04612.38
5.4.180.0170.04212.38
5.4.170.0150.04312.39
5.4.160.0130.04912.38
5.4.150.0160.04612.38
5.4.140.0400.08412.07
5.4.130.0150.04912.05
5.4.120.0160.04312.01
5.4.110.0300.08912.01
5.4.100.0210.03912.01
5.4.90.0130.04712.01
5.4.80.0180.04212.01
5.4.70.0170.04112.00
5.4.60.0160.04112.00
5.4.50.0190.04012.00
5.4.40.0170.04511.99
5.4.30.0160.04311.99
5.4.20.0210.03811.98
5.4.10.0200.04011.98
5.4.00.0150.04111.48
5.3.290.0050.04812.80
5.3.280.0040.03912.71
5.3.270.0170.04512.73
5.3.260.0160.04812.72
5.3.250.0330.09012.72
5.3.240.0160.04512.72
5.3.230.0170.04512.71
5.3.220.0160.04612.68
5.3.210.0350.08712.68
5.3.200.0230.04212.68
5.3.190.0140.04712.68
5.3.180.0160.04612.67
5.3.170.0190.04212.67
5.3.160.0310.09112.68
5.3.150.0180.04212.68
5.3.140.0150.04612.66
5.3.130.0330.05812.66
5.3.120.0100.04912.66
5.3.110.0150.04412.66
5.3.100.0200.03912.12
5.3.90.0140.04412.10
5.3.80.0160.04312.09
5.3.70.0120.04712.09
5.3.60.0240.06512.07
5.3.50.0170.04412.02
5.3.40.0150.04512.02
5.3.30.0090.04711.99
5.3.20.0170.04411.76
5.3.10.0130.04211.73
5.3.00.0160.03911.71
5.2.170.0110.0359.21
5.2.160.0130.0339.21
5.2.150.0160.0309.21
5.2.140.0110.0359.21
5.2.130.0110.0369.17
5.2.120.0130.0359.18
5.2.110.0290.0789.18
5.2.100.0130.0339.18
5.2.90.0130.0329.18
5.2.80.0130.0339.17
5.2.70.0120.0369.17
5.2.60.0100.0369.12
5.2.50.0220.0559.09
5.2.40.0140.0339.07
5.2.30.0090.0369.04
5.2.20.0140.0359.04
5.2.10.0110.0348.94
5.2.00.0250.0508.79
5.1.60.0110.0318.08
5.1.50.0080.0338.07
5.1.40.0120.0288.07
5.1.30.0130.0298.41
5.1.20.0120.0328.44
5.1.10.0130.0298.15
5.1.00.0150.0268.16
5.0.50.0110.0236.64
5.0.40.0070.0246.50
5.0.30.0110.0336.31
5.0.20.0100.0216.28
5.0.10.0110.0206.25
5.0.00.0100.0336.25
4.4.90.0090.0164.78
4.4.80.0090.0154.75
4.4.70.0060.0194.76
4.4.60.0050.0204.75
4.4.50.0090.0154.77
4.4.40.0080.0274.71
4.4.30.0060.0194.76
4.4.20.0060.0194.85
4.4.10.0080.0184.85
4.4.00.0140.0834.76
4.3.110.0080.0164.67
4.3.100.0040.0204.66
4.3.90.0040.0204.63
4.3.80.0070.0274.58
4.3.70.0080.0164.63
4.3.60.0070.0174.63
4.3.50.0070.0174.62
4.3.40.0060.0274.54
4.3.30.0040.0193.29
4.3.20.0020.0213.29
4.3.10.0070.0153.25
4.3.00.0070.01713.29

preferences:
39.39 ms | 401 KiB | 5 Q