3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'A' => array(1, 2, 3, 4), 'B' => array(5, 6), 'C' => array('a', 'b', 'c')); $values=""; function makeCombinations($array){ if(is_array($array)) { foreach($array as $value) { makeCombinations($array); } } else { $values.=$array; } } makeCombinations($array); echo $values;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZnpV1
function name:  (null)
number of ops:  7
compiled vars:  !0 = $array, !1 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, ''
   18     2        INIT_FCALL                                               'makecombinations'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   19     5        ECHO                                                     !1
          6      > RETURN                                                   1

Function makecombinations:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZnpV1
function name:  makeCombinations
number of ops:  13
compiled vars:  !0 = $array, !1 = $value, !2 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~3, ->11
    7     3    > > FE_RESET_R                                       $4      !0, ->9
          4    > > FE_FETCH_R                                               $4, !1, ->9
    9     5    >   INIT_FCALL_BY_NAME                                       'makeCombinations'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
    7     8      > JMP                                                      ->4
          9    >   FE_FREE                                                  $4
         10      > JMP                                                      ->12
   14    11    >   ASSIGN_OP                                     8          !2, !0
   17    12    > > RETURN                                                   null

End of function makecombinations

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.5 ms | 1390 KiB | 14 Q