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 : 0; } } asort($counter); var_dump($counter);
Output for git.master, git.master_jit, rfc.property-hooks
array(11) { ["b"]=> int(0) ["h"]=> int(0) ["i"]=> int(1) ["o"]=> int(1) ["f"]=> int(1) ["k"]=> int(2) ["g"]=> int(2) ["j"]=> int(2) ["r"]=> int(3) ["e"]=> int(3) ["n"]=> int(4) }

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:
44.34 ms | 401 KiB | 8 Q