3v4l.org

run code in 200+ PHP versions simultaneously
<?php function most_repeated_count($word) { $letters = str_split($word); return max(array_count_values($letters)); } $content = 'O Romeo, Romeo, wherefore art thou Romeo?'; $words = explode(' ', $content); $word_counts = array_combine( $words, array_map('most_repeated_count', $words) ); arsort($word_counts); $max = key($word_counts); echo $max;
based on 7Xelm

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
wherefore
Output for Arrow functions
wherefore
Output for Object typehint
wherefore
Output for Array change keys
wherefore
Output for Lexical anon
wherefore

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