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++) { $result = ''; foreach($numbers as $number) $result .= $number; $value = $numbers[$i]; unset($numbers[$i]); $numbers[] = $value; $combos[] = $result; } return $combos; } print_r(FindFamily(312)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hr5dO
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'findfamily'
          2        SEND_VAL                                                 312
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   18     6      > RETURN                                                   1

Function findfamily:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 11
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 11
Branch analysis from position: 27
Branch analysis from position: 11
Branch analysis from position: 16
filename:       /in/hr5dO
function name:  findFamily
number of ops:  29
compiled vars:  !0 = $n, !1 = $numbers, !2 = $combos, !3 = $count, !4 = $i, !5 = $result, !6 = $number, !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                                                      ->25
    7    11    >   ASSIGN                                                   !5, ''
    8    12      > FE_RESET_R                                       $16     !1, ->16
         13    > > FE_FETCH_R                                               $16, !6, ->16
         14    >   ASSIGN_OP                                     8          !5, !6
         15      > JMP                                                      ->13
         16    >   FE_FREE                                                  $16
    9    17        FETCH_DIM_R                                      ~18     !1, !4
         18        ASSIGN                                                   !7, ~18
   10    19        UNSET_DIM                                                !1, !4
   11    20        ASSIGN_DIM                                               !1
         21        OP_DATA                                                  !7
   12    22        ASSIGN_DIM                                               !2
         23        OP_DATA                                                  !5
    6    24        PRE_INC                                                  !4
         25    >   IS_SMALLER                                               !4, !3
         26      > JMPNZ                                                    ~23, ->11
   14    27    > > RETURN                                                   !2
   15    28*     > RETURN                                                   null

End of function findfamily

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.5 ms | 1402 KiB | 18 Q