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=""; $val = array(); function makeCombinations($array,$values){ foreach($array as $value) { if(is_array($value)) makeCombinations($value,$values); else array_push($val,$value); } } makeCombinations($array,$values); print_r($val); //echo $values;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NYWIf
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $values, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, <array>
   14     3        INIT_FCALL                                               'makecombinations'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0          
   15     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
   16    10      > RETURN                                                   1

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

End of function makecombinations

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.66 ms | 1399 KiB | 18 Q