3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'lorem lis pum'; for( $i = 0, $ilen = strlen( $input ), $result = array(); $i < $ilen; $i++ ) { $chr = $input[ $i ]; if( $chr === ' ' ) { $chr = '_'; } $result[ $chr ] = isset( $result[ $chr ] ) ? $result[ $chr ] + 1 : 1; } var_dump( $result );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 6
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 6
Branch analysis from position: 23
Branch analysis from position: 6
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 6
Branch analysis from position: 23
Branch analysis from position: 6
Branch analysis from position: 11
filename:       /in/TaBBJ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $input, !1 = $i, !2 = $ilen, !3 = $result, !4 = $chr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'lorem+lis+pum'
    5     1        ASSIGN                                                   !1, 0
          2        STRLEN                                           ~7      !0
          3        ASSIGN                                                   !2, ~7
          4        ASSIGN                                                   !3, <array>
          5      > JMP                                                      ->21
    6     6    >   FETCH_DIM_R                                      ~10     !0, !1
          7        ASSIGN                                                   !4, ~10
    7     8        IS_IDENTICAL                                             !4, '+'
          9      > JMPZ                                                     ~12, ->11
    8    10    >   ASSIGN                                                   !4, '_'
   10    11    >   ISSET_ISEMPTY_DIM_OBJ                         0          !3, !4
         12      > JMPZ                                                     ~15, ->17
         13    >   FETCH_DIM_R                                      ~16     !3, !4
         14        ADD                                              ~17     ~16, 1
         15        QM_ASSIGN                                        ~18     ~17
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~18     1
         18    >   ASSIGN_DIM                                               !3, !4
         19        OP_DATA                                                  ~18
    5    20        PRE_INC                                                  !1
         21    >   IS_SMALLER                                               !1, !2
         22      > JMPNZ                                                    ~20, ->6
   13    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
219.92 ms | 1001 KiB | 14 Q