3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findFamily($n) { $numbers = str_split("$n"); $combos = array(); $count = count($numbers); echo $count; for($i = 0; $i < $count; $i++) { $baseNumber = $numbers[$i]; //echo $i."\n"; $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/kmSrm
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     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 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 12
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 24
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 12
Branch analysis from position: 42
Branch analysis from position: 12
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 24
Branch analysis from position: 39
Branch analysis from position: 24
filename:       /in/kmSrm
function name:  findFamily
number of ops:  44
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        ECHO                                                     !3
    7    10        ASSIGN                                                   !4, 0
         11      > JMP                                                      ->40
    8    12    >   FETCH_DIM_R                                      ~16     !1, !4
         13        ASSIGN                                                   !5, ~16
   10    14        ASSIGN                                                   !6, !1
   11    15        UNSET_DIM                                                !6, !4
   12    16        INIT_FCALL                                               'array_values'
         17        SEND_VAR                                                 !6
         18        DO_ICALL                                         $19     
         19        ASSIGN                                                   !6, $19
   13    20        COUNT                                            ~21     !6
         21        ASSIGN                                                   !7, ~21
   14    22        ASSIGN                                                   !4, 0
         23      > JMP                                                      ->37
   15    24    >   FETCH_DIM_R                                      ~25     !6, !4
         25        CONCAT                                           ~26     !5, ~25
         26        ADD                                              ~27     !4, 1
         27        FETCH_DIM_R                                      ~28     !6, ~27
         28        CONCAT                                           ~29     ~26, ~28
         29        ASSIGN_DIM                                               !2
         30        OP_DATA                                                  ~29
   16    31        FETCH_DIM_R                                      ~30     !6, !4
         32        ASSIGN                                                   !8, ~30
   17    33        UNSET_DIM                                                !6, !4
   18    34        ASSIGN_DIM                                               !6
         35        OP_DATA                                                  !8
   14    36        PRE_INC                                                  !4
         37    >   IS_SMALLER                                               !4, !7
         38      > JMPNZ                                                    ~34, ->24
    7    39    >   PRE_INC                                                  !4
         40    >   IS_SMALLER                                               !4, !3
         41      > JMPNZ                                                    ~36, ->12
   21    42    > > RETURN                                                   !2
   22    43*     > RETURN                                                   null

End of function findfamily

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.49 ms | 1403 KiB | 18 Q