3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Hello World"; $array = str_split(str_replace(' ', '', $str), 1); $array = array_count_values($array); $keys = array_keys($array); array_multisort($array, $keys); $array = array_combine($keys, $array); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfEin
function name:  (null)
number of ops:  32
compiled vars:  !0 = $str, !1 = $array, !2 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Hello+World'
    4     1        INIT_FCALL                                               'str_split'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '+'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    6    11        INIT_FCALL                                               'array_count_values'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
    8    15        INIT_FCALL                                               'array_keys'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !2, $9
    9    19        INIT_FCALL                                               'array_multisort'
         20        SEND_REF                                                 !1
         21        SEND_REF                                                 !2
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'array_combine'
         24        SEND_VAR                                                 !2
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $12     
         27        ASSIGN                                                   !1, $12
   12    28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.79 ms | 1395 KiB | 27 Q