3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getWord($file){ $contents = $file; $words = str_word_count($contents, 1); $topLetterCount = 0; $topWord = ''; foreach ($words as $word) { $charCount = count_chars(strtolower($word),1); arsort($charCount); $letterCount = array_shift(array_slice($charCount, 0, 1)); if ($topLetterCount < $letterCount) { $topLetterCount = $letterCount; $topWord = $word; } } return $topWord; } $demofile = "Some people feel the rain, while others just get wet."; echo getWord($demofile);

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.0150.00616.63
8.3.50.0130.00522.12
8.3.40.0070.00718.67
8.3.30.0120.00318.76
8.3.20.0040.00420.21
8.3.10.0040.00421.84
8.3.00.0080.00017.90
8.2.180.0090.00618.67
8.2.170.0070.00722.96
8.2.160.0090.00620.25
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00326.16
8.2.120.0030.00617.63
8.2.110.0070.00422.11
8.2.100.0090.00318.04
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0060.00617.91
8.2.50.0000.00818.07
8.2.40.0090.00021.19
8.2.30.0040.00420.50
8.2.20.0050.00317.63
8.2.10.0070.00018.07
8.2.00.0070.00018.12
8.1.280.0070.01025.92
8.1.270.0050.00224.66
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00322.53
8.1.230.0080.00417.65
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.13
8.1.190.0050.00317.22
8.1.180.0000.00718.10
8.1.170.0040.00418.46
8.1.160.0000.00822.02
8.1.150.0040.00418.90
8.1.140.0000.00919.63
8.1.130.0040.00420.30
8.1.120.0000.00717.45
8.1.110.0000.00717.50
8.1.100.0050.00317.36
8.1.90.0000.00717.42
8.1.80.0040.00417.50
8.1.70.0070.00017.47
8.1.60.0040.00717.59
8.1.50.0000.00817.50
8.1.40.0070.00717.50
8.1.30.0060.00317.56
8.1.20.0070.00017.55
8.1.10.0040.00417.50
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.46
8.0.270.0070.00017.14
8.0.260.0070.00018.49
8.0.250.0040.00416.91
8.0.240.0070.00017.02
8.0.230.0020.00517.02
8.0.220.0000.00716.91
8.0.210.0040.00416.86
8.0.200.0030.00316.97
8.0.190.0040.00416.99
8.0.180.0000.00716.99
8.0.170.0040.00416.88
8.0.160.0070.00016.92
8.0.150.0030.00316.93
8.0.140.0040.00416.80
8.0.130.0000.00513.30
8.0.120.0080.00016.81
8.0.110.0030.00516.80
8.0.100.0040.00416.84
8.0.90.0040.00416.98
8.0.80.0040.01116.92
8.0.70.0000.01016.94
8.0.60.0040.00416.99
8.0.50.0000.00816.83
8.0.30.0100.00817.06
8.0.20.0080.01417.40
8.0.10.0040.00417.00
8.0.00.0090.01016.78
7.4.330.0050.00015.08
7.4.320.0030.00316.52
7.4.300.0070.00016.48
7.4.290.0040.00416.59
7.4.280.0050.00216.45
7.4.270.0000.00716.53
7.4.260.0030.00316.63
7.4.250.0040.00416.47
7.4.240.0030.00616.55
7.4.230.0070.00016.41
7.4.220.0040.01416.43
7.4.210.0030.01716.63
7.4.200.0000.00716.71
7.4.160.0060.01016.40
7.4.150.0150.00317.40
7.4.140.0160.00317.86
7.4.130.0190.00216.49
7.4.120.0110.00716.56
7.4.110.0100.00716.56
7.4.100.0090.01316.70
7.4.90.0090.01516.50
7.4.80.0070.01019.39
7.4.70.0070.01016.57
7.4.60.0080.00816.64
7.4.50.0090.00016.57
7.4.40.0060.00916.28
7.4.30.0060.01216.70
7.4.00.0140.00315.08
7.3.330.0000.00513.21
7.3.320.0000.00613.27
7.3.310.0000.00716.28
7.3.300.0000.00716.38
7.3.290.0100.00616.42
7.3.280.0070.01016.38
7.3.270.0050.01317.40
7.3.260.0030.01416.48
7.3.250.0100.01016.48
7.3.240.0120.00716.41
7.3.230.0090.00916.63
7.3.210.0090.00916.50
7.3.200.0060.01016.36
7.3.190.0060.01216.36
7.3.180.0070.01016.31
7.3.170.0100.00616.64
7.3.160.0050.01116.45
7.3.120.0040.01114.92
7.3.110.0070.00715.05
7.3.100.0090.00914.96
7.3.90.0100.00314.83
7.3.80.0030.01314.71
7.3.70.0030.00614.73
7.3.60.0060.00914.89
7.3.50.0120.00314.48
7.3.40.0130.00314.77
7.3.30.0030.01014.86
7.3.20.0080.00816.38
7.3.10.0070.00716.68
7.3.00.0100.00316.48
7.2.330.0090.00916.74
7.2.320.0150.00616.75
7.2.310.0070.01016.66
7.2.300.0080.01216.91
7.2.290.0110.00916.72
7.2.240.0070.00714.89
7.2.230.0030.00615.04
7.2.220.0080.00515.29
7.2.210.0070.01015.19
7.2.200.0000.01514.88
7.2.190.0060.00915.00
7.2.180.0110.00414.88
7.2.170.0040.01114.98
7.2.160.0070.01015.07
7.2.150.0000.01816.92
7.2.140.0000.01316.88
7.2.130.0070.01116.67
7.2.120.0000.01416.67
7.2.110.0060.00916.97
7.2.100.0030.01316.98
7.2.90.0040.00816.96
7.2.80.0070.00716.91
7.2.70.0110.00616.75
7.2.60.0050.01116.80
7.2.50.0140.00316.75
7.2.40.0030.01017.02
7.2.30.0000.01816.80
7.2.20.0060.00916.73
7.2.10.0030.00916.91
7.2.00.0070.00718.24
7.1.330.0060.00615.71
7.1.320.0060.00915.91
7.1.310.0080.00615.75
7.1.300.0000.01115.75
7.1.290.0070.00715.78
7.1.280.0000.01515.95
7.1.270.0100.00315.79
7.1.260.0030.01315.50
7.1.250.0060.00915.73
7.1.200.0060.01015.82
7.1.100.0030.00918.25
7.1.70.0120.00617.00
7.1.60.0100.01319.11
7.1.50.0140.01016.91
7.1.00.0030.07322.48
7.0.200.0630.00414.59
7.0.60.0130.07020.07
7.0.50.0000.05017.86
7.0.40.0030.09020.18
7.0.30.0300.03720.33
7.0.20.0230.03320.07
7.0.10.0270.04720.19
7.0.00.0130.07720.24
5.6.280.0000.03321.08
5.6.210.0230.05720.47
5.6.200.0030.04318.22
5.6.190.0030.09020.64
5.6.180.3970.04020.44
5.6.170.0230.06020.62
5.6.160.0130.03720.54
5.6.150.0100.07318.19
5.6.140.0070.08318.21
5.6.130.0030.07718.15
5.6.120.0070.04721.00
5.6.110.0070.08721.00
5.6.100.0070.08320.98
5.6.90.0030.09021.11
5.6.80.0100.06020.45
5.6.70.0030.07720.33
5.5.350.0130.07320.32
5.5.340.0070.08017.99
5.5.330.0000.09720.40
5.5.320.0100.07720.26
5.5.310.0200.03720.36
5.5.300.0100.05018.07
5.5.290.0030.04318.02
5.5.280.0100.04320.89
5.5.270.0100.08020.77
5.5.260.0030.04320.80
5.5.250.0000.04720.61
5.5.240.0030.03720.29
5.4.450.0600.06719.34
5.4.440.0700.04319.61
5.4.430.0570.06719.61
5.4.420.0670.06019.48
5.4.410.0630.06319.34
5.4.400.0730.04719.27
5.4.390.0700.06019.31
5.4.380.0730.05319.05
5.4.370.0670.05319.25
5.4.360.0770.05318.98
5.4.350.0670.05319.14
5.4.340.0800.04319.15
5.4.320.0370.07018.84
5.4.310.0530.05319.00
5.4.300.0530.05718.83
5.4.290.0530.05018.84
5.4.280.0500.05719.14
5.4.270.0630.05719.13
5.4.260.0700.05018.86
5.4.250.0970.06018.83
5.4.240.0630.06019.30
5.4.230.0730.05718.98
5.4.220.0600.05319.30
5.4.210.0770.05019.36
5.4.200.0600.05019.25
5.4.190.0830.05018.86
5.4.180.0570.05019.25
5.4.170.0530.05318.82
5.4.160.0570.05018.85
5.4.150.0730.05019.10
5.4.140.0770.04716.31
5.4.130.0500.05316.31
5.4.120.0630.05316.52
5.4.110.0670.05716.61
5.4.100.0730.04716.62
5.4.90.0730.04316.41
5.4.80.0630.05016.61
5.4.70.0730.05016.43
5.4.60.0730.05016.49
5.4.50.0630.05316.60
5.4.40.0700.05316.40
5.4.30.0700.05016.54
5.4.20.0830.05716.25
5.4.10.0770.05016.42
5.4.00.0700.04715.86

preferences:
54.53 ms | 401 KiB | 5 Q