3v4l.org

run code in 500+ PHP versions simultaneously
<?php $inStr = 'Hey you guys'; $tokens = array(); $tokenList = explode(' ',$inStr); foreach($tokenList as $bigToken) { $tokens[] = $bigToken; //take care of individual words $tokens = array_merge($tokens, str_split($bigToken)); //take care of single letters for($i = 2; $i < strlen($bigToken); $i++) { $tokens[] = array_shift(str_split($bigToken, $i)); //only need the first element here. } } print_r($tokens);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 35
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 35
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 21
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 21
Branch analysis from position: 34
Branch analysis from position: 21
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/dkFFT
function name:  (null)
number of ops:  40
compiled vars:  !0 = $inStr, !1 = $tokens, !2 = $tokenList, !3 = $bigToken, !4 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'Hey+you+guys'
    3     1        ASSIGN                                                       !1, <array>
    4     2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '+'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $7      
          6        ASSIGN                                                       !2, $7
    5     7      > FE_RESET_R                                           $9      !2, ->35
          8    > > FE_FETCH_R                                                   $9, !3, ->35
    6     9    >   ASSIGN_DIM                                                   !1
         10        OP_DATA                                                      !3
    7    11        INIT_FCALL                                                   'array_merge'
         12        SEND_VAR                                                     !1
         13        INIT_FCALL                                                   'str_split'
         14        SEND_VAR                                                     !3
         15        DO_ICALL                                             $11     
         16        SEND_VAR                                                     $11
         17        DO_ICALL                                             $12     
         18        ASSIGN                                                       !1, $12
    8    19        ASSIGN                                                       !4, 2
         20      > JMP                                                          ->31
    9    21    >   INIT_FCALL                                                   'array_shift'
         22        INIT_FCALL                                                   'str_split'
         23        SEND_VAR                                                     !3
         24        SEND_VAR                                                     !4
         25        DO_ICALL                                             $16     
         26        SEND_VAR_NO_REF                                   0          $16
         27        DO_ICALL                                             $17     
         28        ASSIGN_DIM                                                   !1
         29        OP_DATA                                                      $17
    8    30        PRE_INC                                                      !4
         31    >   STRLEN                                               ~19     !3
         32        IS_SMALLER                                                   !4, ~19
         33      > JMPNZ                                                        ~20, ->21
    5    34    > > JMP                                                          ->8
         35    >   FE_FREE                                                      $9
   12    36        INIT_FCALL                                                   'print_r'
         37        SEND_VAR                                                     !1
         38        DO_ICALL                                                     
         39      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
181.39 ms | 3067 KiB | 18 Q