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
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIqjW
function name:  (null)
number of ops:  24
compiled vars:  !0 = $content, !1 = $words, !2 = $word_counts, !3 = $max
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   QM_ASSIGN                                                !0
   8     1        INIT_FCALL                                               'explode'
         2        SEND_VAL                                                 '+'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $5      
         5        QM_ASSIGN                                                !1
   9     6        INIT_FCALL                                               'array_combine'
  10     7        SEND_VAR                                                 !1
  11     8        INIT_FCALL                                               'array_map'
         9        SEND_VAL                                                 'most_repeated_count'
        10        SEND_VAR                                                 !1
        11        DO_ICALL                                         $7      
        12        SEND_VAR                                                 $7
        13        DO_ICALL                                         $8      
        14        QM_ASSIGN                                                !2
  14    15        INIT_FCALL                                               'arsort'
        16        SEND_REF                                                 !2
        17        DO_ICALL                                                 
  15    18        INIT_FCALL                                               'key'
        19        SEND_VAR                                                 !2
        20        DO_ICALL                                         $11     
        21        QM_ASSIGN                                                !3
  17    22        ASSIGN_OBJ                                               !3
        23      > RETURN                                                   1

Function most_repeated_count:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIqjW
function name:  most_repeated_count
number of ops:  13
compiled vars:  !0 = $word, !1 = $letters
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   RECV                                             !0      
   3     1        INIT_FCALL                                               'str_split'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                         $2      
         4        QM_ASSIGN                                                !1
   4     5        INIT_FCALL                                               'max'
         6        INIT_FCALL                                               'array_count_values'
         7        SEND_VAR                                                 !1
         8        DO_ICALL                                         $4      
         9        SEND_VAR                                                 $4
        10        DO_ICALL                                         $5      
        11      > RETURN                                                   $5
   5    12*     > RETURN                                                   null

End of function most_repeated_count

Generated using Vulcan Logic Dumper, using php 7.4.0