3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findFamily($n) { $numbers = str_split("$n"); $combos = array(); $count = count($numbers); for($i = 0; $i < $count; $i++) { $baseNumber = $numbers[$i]; $tempArray = $numbers; unset($tempArray[$i]); $tempArray = array_filter($tempArray); print_r($tempArray); die(); for($i = 0; $i < count($tempArray); $i++) { $combos[] = $baseNumber.$tempArray[$i].$tempArray[$i + 1]; $value = $tempArray[$i]; unset($tempArray[$i]); $numbers[] = $value; } } return $combos; } print_r(FindFamily(123));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vInHK
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'findfamily'
          2        SEND_VAL                                                 123
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function findfamily:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 11
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/vInHK
function name:  findFamily
number of ops:  46
compiled vars:  !0 = $n, !1 = $numbers, !2 = $combos, !3 = $count, !4 = $i, !5 = $baseNumber, !6 = $tempArray, !7 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'str_split'
          2        CAST                                          6  ~8      !0
          3        SEND_VAL                                                 ~8
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !1, $9
    4     6        ASSIGN                                                   !2, <array>
    5     7        COUNT                                            ~12     !1
          8        ASSIGN                                                   !3, ~12
    6     9        ASSIGN                                                   !4, 0
         10      > JMP                                                      ->42
    7    11    >   FETCH_DIM_R                                      ~15     !1, !4
         12        ASSIGN                                                   !5, ~15
    8    13        ASSIGN                                                   !6, !1
    9    14        UNSET_DIM                                                !6, !4
   10    15        INIT_FCALL                                               'array_filter'
         16        SEND_VAR                                                 !6
         17        DO_ICALL                                         $18     
         18        ASSIGN                                                   !6, $18
   11    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !6
         21        DO_ICALL                                                 
   12    22      > EXIT                                                     
   13    23*       ASSIGN                                                   !4, 0
         24*       JMP                                                      ->38
   14    25*       FETCH_DIM_R                                      ~23     !6, !4
         26*       CONCAT                                           ~24     !5, ~23
         27*       ADD                                              ~25     !4, 1
         28*       FETCH_DIM_R                                      ~26     !6, ~25
         29*       CONCAT                                           ~27     ~24, ~26
         30*       ASSIGN_DIM                                               !2
         31*       OP_DATA                                                  ~27
   15    32*       FETCH_DIM_R                                      ~28     !6, !4
         33*       ASSIGN                                                   !7, ~28
   16    34*       UNSET_DIM                                                !6, !4
   17    35*       ASSIGN_DIM                                               !1
         36*       OP_DATA                                                  !7
   13    37*       PRE_INC                                                  !4
         38*       COUNT                                            ~32     !6
         39*       IS_SMALLER                                               !4, ~32
         40*       JMPNZ                                                    ~33, ->25
    6    41*       PRE_INC                                                  !4
         42    >   IS_SMALLER                                               !4, !3
         43      > JMPNZ                                                    ~35, ->11
   20    44    > > RETURN                                                   !2
   21    45*     > RETURN                                                   null

End of function findfamily

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.58 ms | 1407 KiB | 20 Q