3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = ' Hello 20.04.2016 🚩 my incredibleness face😘face is XYZ '; $words = preg_split('/\s+/', $text, 0, PREG_SPLIT_NO_EMPTY); $wordsLength = array_map('mb_strlen', $words); $lengthCounts = array_count_values($wordsLength); $defaultCounts = array_fill_keys(range(1,10), 0); $filteredCounts = array_intersect_key($lengthCounts, $defaultCounts); $gaplessCounts = array_replace($defaultCounts, $filteredCounts); var_export($words); echo "\n"; var_export($wordsLength); echo "\n"; var_export($lengthCounts); echo "\n"; var_export($defaultCounts); echo "\n"; var_export($filteredCounts); echo "\n"; var_export($gaplessCounts);

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.0180.00316.63
8.3.50.0120.00316.36
8.3.40.0140.00418.96
8.3.30.0070.01518.85
8.3.20.0040.00420.90
8.3.10.0080.00020.31
8.3.00.0080.00020.84
8.2.180.0090.00618.54
8.2.170.0040.01822.96
8.2.160.0090.00620.55
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0030.00526.16
8.2.110.0040.00720.53
8.2.100.0090.00317.91
8.2.90.0040.00417.75
8.2.80.0030.00519.04
8.2.70.0060.00317.93
8.2.60.0040.00418.14
8.2.50.0050.00319.10
8.2.40.0030.00521.10
8.2.30.0040.00419.19
8.2.20.0000.00818.07
8.2.10.0000.00819.32
8.2.00.0030.00519.32
8.1.280.0120.00325.92
8.1.270.0040.00422.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00020.91
8.1.230.0070.00420.85
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.47
8.1.190.0000.00817.38
8.1.180.0050.00319.02
8.1.170.0000.01018.72
8.1.160.0000.00718.94
8.1.150.0030.00618.73
8.1.140.0040.00418.84
8.1.130.0000.00720.15
8.1.120.0040.00317.48
8.1.110.0040.00417.52
8.1.100.0000.00817.57
8.1.90.0070.00017.55
8.1.80.0030.00617.45
8.1.70.0090.00017.43
8.1.60.0030.00617.70
8.1.50.0050.00317.54
8.1.40.0040.00417.71
8.1.30.0040.00417.83
8.1.20.0040.00417.74
8.1.10.0110.00017.73
8.1.00.0040.00417.52
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0030.00318.53
8.0.270.0000.00717.02
8.0.260.0030.00320.07
8.0.250.0020.00517.09
8.0.240.0040.00417.12
8.0.230.0040.00417.11
8.0.220.0070.00017.03
8.0.210.0000.00717.08
8.0.200.0030.00317.09
8.0.190.0080.00417.08
8.0.180.0040.00417.10
8.0.170.0000.00817.00
8.0.160.0040.00416.92
8.0.150.0050.00517.00
8.0.140.0000.00816.90
8.0.130.0060.00013.44
8.0.120.0040.00417.04
8.0.110.0040.00417.10
8.0.100.0040.00416.95
8.0.90.0030.00617.05
8.0.80.0080.01017.01
8.0.70.0030.00316.92
8.0.60.0040.00417.01
8.0.50.0030.00516.99
8.0.30.0060.00917.41
8.0.20.0090.01017.05
8.0.10.0040.00417.09
8.0.00.0140.00416.88
7.4.330.0030.00315.55
7.4.320.0040.00416.64
7.4.300.0030.00316.75
7.4.290.0000.00716.75
7.4.280.0080.00016.72
7.4.270.0030.00316.57
7.4.260.0000.00513.38
7.4.250.0040.00416.73
7.4.240.0030.00316.63
7.4.230.0040.00416.45
7.4.220.0030.00316.67
7.4.210.0100.00516.68
7.4.200.0030.00316.78
7.4.130.0130.01016.72
7.4.120.0110.00616.63
7.4.110.0040.01216.75
7.4.100.0060.01116.60
7.4.90.0070.01016.66
7.4.80.0060.01719.39
7.4.70.0060.00916.61
7.4.60.0070.01016.73
7.4.50.0060.01216.63
7.4.40.0130.00416.64
7.4.20.0040.01216.78
7.4.10.0120.00816.66
7.4.00.0090.00916.48
7.3.330.0070.00016.35
7.3.320.0060.00013.01
7.3.310.0000.00716.22
7.3.300.0040.00416.29
7.3.290.0030.01316.22
7.3.280.0150.00516.25
7.3.260.0090.00916.65
7.3.240.0120.00816.50
7.3.230.0070.01016.39
7.3.210.0200.00316.48
7.3.200.0070.01116.62
7.3.190.0100.01116.63
7.3.180.0090.00916.69
7.3.170.0040.01216.37
7.3.160.0120.00416.62
7.3.140.0100.01016.56
7.3.130.0140.01016.77
7.3.120.0070.01016.61
7.3.110.0110.00716.10
7.3.100.0090.00616.56
7.3.90.0080.01616.14
7.3.80.0120.00816.22
7.3.70.0080.01116.63
7.3.60.0070.01416.31
7.3.50.0070.01016.46
7.3.40.0160.00016.28
7.3.30.0060.01016.39
7.3.20.0060.01616.56
7.3.10.0100.01316.38
7.3.00.0140.01016.40
7.2.330.0090.01016.71
7.2.320.0060.01216.79
7.2.310.0170.00016.52
7.2.300.0110.00716.86
7.2.290.0120.00916.73
7.2.270.0030.01716.70
7.2.260.0090.01316.73
7.2.250.0070.01316.63
7.2.240.0120.01416.84
7.2.230.0050.01416.64
7.2.220.0180.00816.46
7.2.210.0090.01616.62
7.2.200.0060.01216.55
7.2.190.0080.01516.71
7.2.180.0160.00716.63
7.2.170.0120.00616.57
7.2.160.0090.00916.57
7.2.150.0090.00916.68
7.2.140.0180.00016.70
7.2.130.0090.01516.58
7.2.120.0110.01416.78
7.2.110.0120.00816.76
7.2.100.0110.01116.55
7.2.90.0090.00916.75
7.2.80.0160.00316.82
7.2.70.0040.01316.66
7.2.60.0140.00316.70
7.2.50.0070.01016.59
7.2.40.0100.01116.75
7.2.30.0080.01016.70
7.2.20.0230.01016.69
7.2.10.0180.00716.51
7.2.00.0130.01616.55

preferences:
67.2 ms | 400 KiB | 5 Q