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_values($tempArray); 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/oEl0J
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     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 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 11
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 21
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 11
Branch analysis from position: 40
Branch analysis from position: 11
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 21
Branch analysis from position: 37
Branch analysis from position: 21
filename:       /in/oEl0J
function name:  findFamily
number of ops:  42
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                                                      ->38
    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_values'
         16        SEND_VAR                                                 !6
         17        DO_ICALL                                         $18     
         18        ASSIGN                                                   !6, $18
   11    19        ASSIGN                                                   !4, 0
         20      > JMP                                                      ->34
   12    21    >   FETCH_DIM_R                                      ~22     !6, !4
         22        CONCAT                                           ~23     !5, ~22
         23        ADD                                              ~24     !4, 1
         24        FETCH_DIM_R                                      ~25     !6, ~24
         25        CONCAT                                           ~26     ~23, ~25
         26        ASSIGN_DIM                                               !2
         27        OP_DATA                                                  ~26
   13    28        FETCH_DIM_R                                      ~27     !6, !4
         29        ASSIGN                                                   !7, ~27
   14    30        UNSET_DIM                                                !6, !4
   15    31        ASSIGN_DIM                                               !1
         32        OP_DATA                                                  !7
   11    33        PRE_INC                                                  !4
         34    >   COUNT                                            ~31     !6
         35        IS_SMALLER                                               !4, ~31
         36      > JMPNZ                                                    ~32, ->21
    6    37    >   PRE_INC                                                  !4
         38    >   IS_SMALLER                                               !4, !3
         39      > JMPNZ                                                    ~34, ->11
   18    40    > > RETURN                                                   !2
   19    41*     > RETURN                                                   null

End of function findfamily

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.91 ms | 1403 KiB | 20 Q