3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TEXT rkenbgjengrnekjrgn2ioih34fnorfejk TEXT; $char = array_merge(range("a", "z"), range("A", "Z")); $length = strlen($text); $counter = array(); for($i = 0; $i < $length; $i++) { $item = $text[$i]; if (in_array($item, $char)) { $counter[$item] = isset($counter[$item]) ? $counter[$item] + 1 : 1; } } arsort($counter); var_dump($counter);
Output for git.master, git.master_jit, rfc.property-hooks
array(11) { ["n"]=> int(5) ["r"]=> int(4) ["e"]=> int(4) ["k"]=> int(3) ["g"]=> int(3) ["j"]=> int(3) ["i"]=> int(2) ["o"]=> int(2) ["f"]=> int(2) ["b"]=> int(1) ["h"]=> int(1) }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.64 ms | 402 KiB | 8 Q