3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( "0" => 12 , "1" => 17 , "2" => 5, "3" => 27, "4" => 5,"5" => 5); $i=1; foreach($array as $key=>$values) { $max = max($array); echo "\n".$max." rank is ". $i."\n"; $keys = array_search($max, $array); unset($array[$keys]); if(sizeof($array) >0) if(!in_array($max,$array)) $i++; }

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.00718.28
8.3.50.0070.00716.38
8.3.40.0130.00718.76
8.3.30.0120.00318.55
8.3.20.0050.00320.29
8.3.10.0080.00023.36
8.3.00.0050.00319.78
8.2.180.0120.00918.10
8.2.170.0060.00922.96
8.2.160.0040.01119.21
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00619.19
8.2.120.0080.00026.35
8.2.110.0000.00920.34
8.2.100.0040.00817.84
8.2.90.0050.00319.25
8.2.80.0050.00317.97
8.2.70.0040.00717.61
8.2.60.0110.00017.80
8.2.50.0030.00618.16
8.2.40.0000.00820.45
8.2.30.0040.00419.34
8.2.20.0000.00817.99
8.2.10.0000.00718.17
8.2.00.0090.00018.18
8.1.280.0130.00325.92
8.1.270.0080.00022.10
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.67
8.1.230.0060.00619.16
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0080.00017.23
8.1.190.0080.00017.22
8.1.180.0050.00318.10
8.1.170.0040.00420.37
8.1.160.0030.00319.02
8.1.150.0040.00418.88
8.1.140.0000.00719.58
8.1.130.0070.00018.90
8.1.120.0000.00717.37
8.1.110.0040.00417.31
8.1.100.0040.00417.38
8.1.90.0000.00717.49
8.1.80.0000.00817.41
8.1.70.0000.00817.45
8.1.60.0040.00417.47
8.1.50.0000.00817.41
8.1.40.0040.00417.51
8.1.30.0040.00417.62
8.1.20.0000.00817.55
8.1.10.0040.00417.43
8.1.00.0000.00817.43
8.0.300.0030.00618.77
8.0.290.0070.00016.63
8.0.280.0000.00718.46
8.0.270.0030.00317.32
8.0.260.0060.00016.82
8.0.250.0070.00017.03
8.0.240.0030.00316.91
8.0.230.0030.00316.96
8.0.220.0000.00716.73
8.0.210.0070.00016.78
8.0.200.0030.00316.99
8.0.190.0040.00416.95
8.0.180.0000.00816.91
8.0.170.0050.00316.86
8.0.160.0040.00416.79
8.0.150.0000.00716.75
8.0.140.0020.00516.89
8.0.130.0040.00413.41
8.0.120.0030.00616.81
8.0.110.0030.00516.83
8.0.100.0040.00416.79
8.0.90.0040.00416.96
8.0.80.0030.01416.84
8.0.70.0040.00416.88
8.0.60.0000.00816.84
8.0.50.0080.00016.78
8.0.30.0080.01117.01
8.0.20.0090.01117.41
8.0.10.0000.00716.90
8.0.00.0070.01016.82
7.4.330.0000.00515.55
7.4.320.0060.00016.42
7.4.300.0030.00316.59
7.4.290.0000.00716.41
7.4.280.0050.00316.59
7.4.270.0060.00316.36
7.4.260.0060.00316.48
7.4.250.0070.00016.55
7.4.240.0000.00716.63
7.4.230.0070.00016.36
7.4.220.0070.01316.53
7.4.210.0030.01216.56
7.4.200.0070.00016.54
7.4.160.0080.00816.51
7.4.150.0120.00617.40
7.4.140.0140.00617.86
7.4.130.0090.00916.42
7.4.120.0100.01016.61
7.4.110.0070.01316.71
7.4.100.0130.00316.56
7.4.90.0170.00416.56
7.4.80.0090.00919.39
7.4.70.0060.01016.36
7.4.60.0070.01316.49
7.4.50.0000.01216.47
7.4.40.0190.00316.61
7.4.30.0040.01816.68
7.4.00.0080.00815.10
7.3.330.0060.00013.18
7.3.320.0050.00013.16
7.3.310.0070.00016.22
7.3.300.0000.00616.28
7.3.290.0060.00916.27
7.3.280.0110.00716.29
7.3.270.0120.00617.40
7.3.260.0110.00716.47
7.3.250.0080.00916.60
7.3.240.0090.00716.57
7.3.230.0100.00616.73
7.3.210.0060.01016.57
7.3.200.0080.01116.38
7.3.190.0030.01616.26
7.3.180.0120.00416.48
7.3.170.0080.00816.28
7.3.160.0060.01016.38
7.3.10.0030.01216.66
7.3.00.0070.00716.50
7.2.330.0140.00316.60
7.2.320.0120.00616.54
7.2.310.0110.00516.44
7.2.300.0120.00416.59
7.2.290.0130.00716.72
7.2.130.0060.00917.02
7.2.120.0030.00617.11
7.2.110.0040.01016.98
7.2.100.0070.00716.86
7.2.90.0000.01216.92
7.2.80.0000.01517.05
7.2.70.0040.00816.64
7.2.60.0030.01216.91
7.2.50.0060.00817.09
7.2.40.0040.00816.87
7.2.30.0100.00716.93
7.2.20.0040.00716.98
7.2.10.0000.01116.66
7.2.00.0030.00818.29
7.1.250.0070.00715.79
7.1.200.0120.00315.70
7.1.100.0080.00518.07
7.1.70.0030.00717.13
7.1.60.0070.01716.85
7.1.50.0060.01916.86
7.1.40.0060.01316.57
7.1.30.0030.01316.45
7.1.20.0060.01316.73
7.1.10.0040.01116.67
7.1.00.0050.00316.54
7.0.200.0030.01416.76
7.0.190.0040.00416.69
7.0.180.0100.00616.45
7.0.170.0030.00616.45
7.0.160.0040.00816.45
7.0.150.0000.00816.45
7.0.140.0000.01216.55
7.0.130.0030.00616.47
7.0.120.0000.00916.45
7.0.110.0020.00716.48
7.0.100.0020.00816.59
7.0.90.0050.00516.45
7.0.80.0090.00316.45
7.0.70.0060.00316.45
7.0.60.0030.00616.45
7.0.50.0030.01016.45
7.0.40.0040.00816.45
7.0.30.0090.00316.45
7.0.20.0100.00016.45
7.0.10.0100.00516.45
7.0.00.0000.01016.45

preferences:
47.51 ms | 400 KiB | 5 Q