3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createCombinations($input, $length) { foreach($input as $c) { if($length == 1) { echo $c; } else { foreach(createCombinations($input, $length -1) as $s) { echo $c + $s; } } } } $texte = "abcdefghijklmnopqrstuvwxyz0123456789"; $input = str_split($texte ); createCombinations($input, 4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTgdW
function name:  (null)
number of ops:  10
compiled vars:  !0 = $texte, !1 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, 'abcdefghijklmnopqrstuvwxyz0123456789'
   20     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   21     5        INIT_FCALL                                               'createcombinations'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 4
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function createcombinations:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/tTgdW
function name:  createCombinations
number of ops:  22
compiled vars:  !0 = $input, !1 = $length, !2 = $c, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2      > FE_RESET_R                                       $4      !0, ->20
          3    > > FE_FETCH_R                                               $4, !2, ->20
    7     4    >   IS_EQUAL                                                 !1, 1
          5      > JMPZ                                                     ~5, ->8
    8     6    >   ECHO                                                     !2
          7      > JMP                                                      ->19
   12     8    >   INIT_FCALL_BY_NAME                                       'createCombinations'
          9        SEND_VAR_EX                                              !0
         10        SUB                                              ~6      !1, 1
         11        SEND_VAL_EX                                              ~6
         12        DO_FCALL                                      0  $7      
         13      > FE_RESET_R                                       $8      $7, ->18
         14    > > FE_FETCH_R                                               $8, !3, ->18
   13    15    >   ADD                                              ~9      !2, !3
         16        ECHO                                                     ~9
   12    17      > JMP                                                      ->14
         18    >   FE_FREE                                                  $8
    6    19    > > JMP                                                      ->3
         20    >   FE_FREE                                                  $4
   17    21      > RETURN                                                   null

End of function createcombinations

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.49 ms | 1403 KiB | 16 Q