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++) { echo $i."\n"; $baseNumber = $numbers[$i]; $tempArray = $numbers; unset($tempArray[$i]); $tempArray = array_values($tempArray); $countTempArray = count($tempArray); for($i = 0; $i < $countTempArray; $i++) { $combos[] = $baseNumber.$tempArray[$i].$tempArray[$i + 1]; $value = $tempArray[$i]; unset($tempArray[$i]); $tempArray[] = $value; } } return $combos; } FindFamily(123);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UDSmX
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'findfamily'
          1        SEND_VAL                                                 123
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

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

End of function findfamily

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
208.31 ms | 1394 KiB | 18 Q