3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( "0" => 12 , "1" => 17 , "2" => 65, "3" => 27, "4" => 5 ); //$arrays = $array; $i=1; foreach($array as $key=>$values) { $max = max($array); echo "\n".max($array)." rank is ". $i."\n"; $keys = array_search(max($array), $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.0060.01418.30
8.3.50.0120.00521.99
8.3.40.0060.01218.85
8.3.30.0100.00319.04
8.3.20.0070.00020.04
8.3.10.0000.00822.09
8.3.00.0040.00422.27
8.2.180.0070.01517.00
8.2.170.0180.00022.96
8.2.160.0100.00721.06
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0110.00726.16
8.2.120.0030.00519.26
8.2.110.0100.00022.29
8.2.100.0070.00419.45
8.2.90.0080.00019.35
8.2.80.0000.00818.05
8.2.70.0040.00417.63
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0040.00418.06
8.2.20.0070.00017.71
8.2.10.0000.00717.63
8.2.00.0040.00417.71
8.1.280.0150.00325.92
8.1.270.0060.00322.05
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00823.89
8.1.230.0080.00419.15
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0040.00417.43
8.1.180.0060.00318.77
8.1.170.0030.00618.65
8.1.160.0030.00622.02
8.1.150.0040.00418.60
8.1.140.0000.00717.45
8.1.130.0060.00317.83
8.1.120.0020.00517.43
8.1.110.0030.00617.34
8.1.100.0000.00717.42
8.1.90.0050.00317.46
8.1.80.0000.00717.33
8.1.70.0030.00317.36
8.1.60.0040.00417.47
8.1.50.0030.00617.60
8.1.40.0050.00217.42
8.1.30.0040.00417.65
8.1.20.0000.00817.69
8.1.10.0070.00017.43
8.1.00.0060.00317.47
8.0.300.0030.00618.77
8.0.290.0000.00717.15
8.0.280.0000.00718.41
8.0.270.0030.00317.25
8.0.260.0030.00316.86
8.0.250.0030.00317.00
8.0.240.0040.00416.94
8.0.230.0030.00316.86
8.0.220.0000.00816.89
8.0.210.0070.00016.90
8.0.200.0000.00716.86
8.0.190.0040.00416.99
8.0.180.0040.00416.90
8.0.170.0040.00416.96
8.0.160.0070.00016.91
8.0.150.0040.00316.80
8.0.140.0000.00816.83
8.0.130.0000.01013.35
8.0.120.0050.00216.81
8.0.110.0000.00716.98
8.0.100.0040.00416.90
8.0.90.0080.00016.86
8.0.80.0090.00616.84
8.0.70.0000.00716.78
8.0.60.0000.00716.89
8.0.50.0000.00716.91
8.0.30.0120.01417.02
8.0.20.0140.00617.40
8.0.10.0050.00217.01
8.0.00.0090.00916.68
7.4.330.0050.00015.08
7.4.320.0060.00016.42
7.4.300.0000.00616.52
7.4.290.0030.00316.44
7.4.280.0040.00416.64
7.4.270.0000.00916.56
7.4.260.0040.00416.60
7.4.250.0070.00016.49
7.4.240.0040.00416.55
7.4.230.0000.00716.40
7.4.220.0070.01116.42
7.4.210.0070.01116.51
7.4.200.0030.00316.60
7.4.190.0000.00716.64
7.4.160.0040.01216.61
7.4.150.0060.01517.40
7.4.140.0100.00917.86
7.4.130.0090.00816.66
7.4.120.0140.00516.58
7.4.110.0030.01316.50
7.4.100.0110.00716.54
7.4.90.0100.01016.49
7.4.80.0070.01019.39
7.4.70.0060.01516.53
7.4.60.0070.01016.59
7.4.50.0080.00016.50
7.4.40.0060.01222.77
7.4.30.0090.01016.52
7.4.00.0000.01515.00
7.3.330.0030.00313.16
7.3.320.0000.00613.02
7.3.310.0000.00716.24
7.3.300.0000.00616.31
7.3.290.0040.01116.18
7.3.280.0060.01116.25
7.3.270.0140.00417.40
7.3.260.0120.00916.55
7.3.250.0070.01116.30
7.3.240.0030.01416.35
7.3.230.0030.01316.39
7.3.210.0070.01116.75
7.3.200.0090.00619.39
7.3.190.0030.01616.34
7.3.180.0100.01016.46
7.3.170.0040.01216.27
7.3.160.0060.00916.28
7.3.120.0070.01014.66
7.3.10.0160.00416.90
7.3.00.0030.01216.70
7.2.330.0060.01716.51
7.2.320.0070.01016.74
7.2.310.0110.01116.70
7.2.300.0110.00516.71
7.2.290.0080.00816.75
7.2.130.0130.00516.84
7.2.120.0060.00816.94
7.2.110.0050.00916.89
7.2.100.0020.01017.07
7.2.90.0080.00816.90
7.2.80.0030.00816.95
7.2.70.0000.01316.95
7.2.60.0060.00816.80
7.2.50.0050.00816.95
7.2.40.0060.00817.01
7.2.30.0050.00716.92
7.2.20.0050.00816.91
7.2.10.0090.00616.99
7.2.00.0040.00917.87
7.1.250.0060.00915.75
7.1.240.0070.00415.51
7.1.230.0030.01015.76
7.1.220.0030.00615.61
7.1.210.0040.01115.69
7.1.200.0030.00815.69
7.1.190.0070.00715.79
7.1.180.0120.00315.84
7.1.170.0090.00015.86
7.1.160.0030.00915.80
7.1.150.0030.00915.79
7.1.140.0070.00415.78
7.1.130.0080.00015.64
7.1.120.0070.00315.58
7.1.110.0000.01115.80
7.1.100.0010.00816.71
7.1.90.0060.00615.78
7.1.80.0080.00516.07
7.1.70.0070.00216.34
7.1.60.0050.01517.77
7.1.50.0100.00516.28
7.1.40.0040.00715.50
7.1.30.0090.00315.86
7.1.20.0070.00715.40
7.1.10.0030.00915.80
7.1.00.0020.04318.97
7.0.330.0030.00915.65
7.0.320.0100.00615.55
7.0.310.0030.00715.36
7.0.300.0000.01215.41
7.0.290.0080.00815.09
7.0.280.0060.00615.05
7.0.270.0070.00715.32
7.0.260.0030.00715.25
7.0.250.0030.01015.38
7.0.240.0030.00915.20
7.0.230.0090.00315.48
7.0.220.0060.00315.46
7.0.210.0000.00915.08
7.0.200.0020.00716.11
7.0.190.0030.01015.37
7.0.180.0030.00715.23
7.0.170.0040.00815.43
7.0.160.0070.00715.20
7.0.150.0000.01015.29
7.0.140.0040.03918.82
7.0.130.0100.00315.24
7.0.120.0050.00515.10
7.0.110.0040.00715.37
7.0.100.0030.00615.30
7.0.90.0030.00515.11
7.0.80.0060.00315.29
7.0.70.0030.00715.45
7.0.60.0070.04317.78
7.0.50.0060.02516.53
7.0.40.0070.04516.90
7.0.30.0230.03616.85
7.0.20.0150.04216.90
7.0.10.0100.02716.99
7.0.00.0020.04916.89
5.6.380.0030.01014.29
5.6.370.0060.00614.45
5.6.360.0060.00614.42
5.6.350.0030.00914.22
5.6.340.0090.00614.59
5.6.330.0030.00814.68
5.6.320.0040.01114.53
5.6.310.0000.01214.17
5.6.300.0080.00514.45
5.6.290.0140.00014.08
5.6.280.0050.04017.83
5.6.270.0070.00714.58
5.6.260.0030.00514.36
5.6.250.0000.01014.38
5.6.240.0070.00714.36
5.6.230.0070.00314.25
5.6.220.0070.00314.28
5.6.210.0120.04217.40
5.6.200.0100.03816.19
5.6.190.0060.02217.55
5.6.180.1720.02217.53
5.6.170.0300.03317.32
5.6.160.0110.03817.33
5.6.150.0050.02516.12
5.6.140.0090.03116.32
5.6.130.0070.04016.16
5.6.120.0150.03817.69
5.6.110.0100.04517.75
5.6.100.0070.04217.49
5.6.90.0050.04717.66
5.6.80.0070.04217.35
5.6.70.0050.04417.31
5.6.60.0000.01514.37
5.6.50.0070.00714.02
5.6.40.0030.01014.29
5.6.30.0060.00614.21
5.6.20.0030.01014.39
5.6.10.0040.01114.17
5.6.00.0030.00614.21
5.5.380.0030.00810.96
5.5.370.0050.00611.14
5.5.360.0030.00711.27
5.5.350.0020.03115.68
5.5.340.0030.02214.47
5.5.330.0030.04315.70
5.5.320.0100.02815.60
5.5.310.0120.02815.74
5.5.300.0030.04814.65
5.5.290.0050.04614.58
5.5.280.0100.04015.74
5.5.270.0050.03515.95
5.5.260.0080.04315.86
5.5.250.0070.04315.75
5.5.240.0100.04415.49
5.5.230.0000.00711.05
5.5.220.0030.00710.84
5.5.210.0030.00711.17
5.5.200.0060.00610.89
5.5.190.0060.00011.16
5.5.180.0000.00911.06
5.5.170.0030.00610.86
5.5.160.0040.00411.01
5.5.150.0000.00710.89
5.5.140.0070.00411.22
5.5.130.0080.00410.68
5.5.120.0090.00311.07
5.5.110.0100.00011.22
5.5.100.0060.00010.91
5.5.90.0060.00310.87
5.5.80.0030.00611.17
5.5.70.0060.00310.94
5.5.60.0030.00711.07
5.5.50.0060.00610.84
5.5.40.0080.00010.97
5.5.30.0000.01010.68
5.5.20.0080.00410.77
5.5.10.0070.00310.79
5.5.00.0000.01110.64
5.4.450.0320.02815.26
5.4.440.0300.03215.35
5.4.430.0100.02715.04
5.4.420.0100.02615.24
5.4.410.0100.02715.18
5.4.400.0540.00014.90
5.4.390.0370.00214.68
5.4.380.0140.02914.64
5.4.370.0240.02614.58
5.4.360.0200.02814.57
5.4.350.0200.02814.77
5.4.340.0160.02814.80
5.4.330.0090.00310.57
5.4.320.0050.02211.83
5.4.310.0090.02211.52
5.4.300.0050.02011.74
5.4.290.0020.02211.55
5.4.280.0040.01911.61
5.4.270.0060.01911.75
5.4.260.0040.03214.74
5.4.250.0060.03615.01
5.4.240.0110.02514.88
5.4.230.0050.03014.78
5.4.220.0100.02714.83
5.4.210.0100.02514.96
5.4.200.0050.04314.89
5.4.190.0080.02514.73
5.4.180.0030.03314.83
5.4.170.0080.03914.91
5.4.160.0090.03014.84
5.4.150.0020.04214.81
5.4.140.0070.03713.56
5.4.130.0110.03313.69
5.4.120.0110.02513.60
5.4.110.0080.03513.68
5.4.100.0120.02313.55
5.4.90.0080.02313.60
5.4.80.0080.02513.78
5.4.70.0050.02813.67
5.4.60.0080.02713.68
5.4.50.0050.02913.64
5.4.40.0130.02213.72
5.4.30.0100.02813.73
5.4.20.0070.02713.67
5.4.10.0100.03613.63
5.4.00.0120.02713.37
5.3.290.0030.02511.68
5.3.280.0060.03212.42
5.3.270.0030.04612.40
5.3.260.0050.03212.46
5.3.250.0080.02812.31
5.3.240.0120.02512.49
5.3.230.0070.03812.53
5.3.220.0080.03312.30
5.3.210.0070.02812.44
5.3.200.0080.02812.54
5.3.190.0030.03012.29
5.3.180.0080.02812.61
5.3.170.0050.03912.48
5.3.160.0050.03012.58
5.3.150.0070.03212.57
5.3.140.0090.02512.42
5.3.130.0020.03812.48
5.3.120.0050.03312.53
5.3.110.0080.02712.24
5.3.100.0150.02012.24
5.3.90.0080.04012.30
5.3.80.0120.03312.11
5.3.70.0130.03212.04
5.3.60.0030.03012.20
5.3.50.0090.03412.13
5.3.40.0050.03812.13
5.3.30.0110.02812.14
5.3.20.0030.03012.06
5.3.10.0050.02512.01
5.3.00.0030.03111.74
5.2.170.0050.02610.28
5.2.160.0050.02710.33
5.2.150.0060.02510.34
5.2.140.0060.02710.22
5.2.130.0050.03010.33
5.2.120.0050.02010.19
5.2.110.0070.02010.14
5.2.100.0070.02310.35
5.2.90.0070.02910.32
5.2.80.0060.02110.24
5.2.70.0060.02210.33
5.2.60.0060.02110.11
5.2.50.0080.02110.10
5.2.40.0070.02610.15
5.2.30.0140.01310.19
5.2.20.0080.02610.15
5.2.10.0070.02810.15
5.2.00.0080.02110.10
5.1.60.0070.0179.68
5.1.50.0030.0219.75
5.1.40.0000.0299.71
5.1.30.0060.0179.85
5.1.20.0050.0189.87
5.1.10.0050.0239.73
5.1.00.0070.0199.72
5.0.50.0050.0179.10
5.0.40.0090.0128.96
5.0.30.0030.0288.85
5.0.20.0040.0228.90
5.0.10.0070.0138.79
5.0.00.0040.0208.83
4.4.90.0020.0178.42
4.4.80.0050.0158.42
4.4.70.0050.0138.42
4.4.60.0020.0148.42
4.4.50.0050.0138.43
4.4.40.0000.0278.43
4.4.30.0020.0158.43
4.4.20.0010.0188.43
4.4.10.0030.0188.43
4.4.00.0030.0228.43
4.3.110.0030.0158.43
4.3.100.0010.0138.43
4.3.90.0030.0128.43
4.3.80.0050.0158.43
4.3.70.0030.0118.43
4.3.60.0030.0108.43
4.3.50.0050.0158.43
4.3.40.0010.0208.43
4.3.30.0020.0128.43
4.3.20.0030.0108.43
4.3.10.0030.0128.43
4.3.00.0060.0128.81

preferences:
61.67 ms | 400 KiB | 5 Q