3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pivot = []; $n = 0; for ($i = 1; $i <= 20; $i++) { $pivot[$i] = []; } for($i = 1; $i <= 20; $n++) { $user = &$pivot[$i]; $rand = rand(1, 20); while(in_array($rand, $user) || $rand == $i) { $rand = rand(1, 20); } $user[] = $rand; if($n >= 10) { $i++; $n = 0; } } for($i = 1; $i <= 20; $i++) { natsort($pivot[$i]); } echo "INSERT INTO `following_pivot` (`uid`, `fid`) VALUES "; foreach($pivot as $key => $piv) { foreach($piv as $pi) { echo "(", $key, ",", $pi, ")"; if($piv === end($pivot) && $pi === end($piv)) { } else { echo ","; } } } echo ";";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 11
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 43
Branch analysis from position: 50
2 jumps found. (Code = 77) Position 1 = 52, Position 2 = 77
Branch analysis from position: 52
2 jumps found. (Code = 78) Position 1 = 53, Position 2 = 77
Branch analysis from position: 53
2 jumps found. (Code = 77) Position 1 = 55, Position 2 = 75
Branch analysis from position: 55
2 jumps found. (Code = 78) Position 1 = 56, Position 2 = 75
Branch analysis from position: 56
2 jumps found. (Code = 46) Position 1 = 66, Position 2 = 71
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 73
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 71
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 75
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 43
Branch analysis from position: 50
Branch analysis from position: 43
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 19
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 11
Branch analysis from position: 41
Branch analysis from position: 11
Branch analysis from position: 38
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
Branch analysis from position: 31
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
Branch analysis from position: 4
filename:       /in/lSBCZ
function name:  (null)
number of ops:  80
compiled vars:  !0 = $pivot, !1 = $n, !2 = $i, !3 = $user, !4 = $rand, !5 = $piv, !6 = $key, !7 = $pi
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
    7     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->7
    8     4    >   ASSIGN_DIM                                               !0, !2
          5        OP_DATA                                                  <array>
    7     6        PRE_INC                                                  !2
          7    >   IS_SMALLER_OR_EQUAL                                      !2, 20
          8      > JMPNZ                                                    ~13, ->4
   11     9    >   ASSIGN                                                   !2, 1
         10      > JMP                                                      ->39
   12    11    >   FETCH_DIM_W                                      $15     !0, !2
         12        ASSIGN_REF                                               !3, $15
   13    13        INIT_FCALL                                               'rand'
         14        SEND_VAL                                                 1
         15        SEND_VAL                                                 20
         16        DO_ICALL                                         $17     
         17        ASSIGN                                                   !4, $17
   14    18      > JMP                                                      ->24
   15    19    >   INIT_FCALL                                               'rand'
         20        SEND_VAL                                                 1
         21        SEND_VAL                                                 20
         22        DO_ICALL                                         $19     
         23        ASSIGN                                                   !4, $19
   14    24    >   INIT_FCALL                                               'in_array'
         25        SEND_VAR                                                 !4
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $21     
         28      > JMPNZ_EX                                         ~22     $21, ->31
         29    >   IS_EQUAL                                         ~23     !4, !2
         30        BOOL                                             ~22     ~23
         31    > > JMPNZ                                                    ~22, ->19
   18    32    >   ASSIGN_DIM                                               !3
         33        OP_DATA                                                  !4
   20    34        IS_SMALLER_OR_EQUAL                                      10, !1
         35      > JMPZ                                                     ~25, ->38
   21    36    >   PRE_INC                                                  !2
   22    37        ASSIGN                                                   !1, 0
   11    38    >   PRE_INC                                                  !1
         39    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         40      > JMPNZ                                                    ~29, ->11
   26    41    >   ASSIGN                                                   !2, 1
         42      > JMP                                                      ->48
   27    43    >   INIT_FCALL                                               'natsort'
         44        FETCH_DIM_W                                      $31     !0, !2
         45        SEND_REF                                                 $31
         46        DO_ICALL                                                 
   26    47        PRE_INC                                                  !2
         48    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         49      > JMPNZ                                                    ~34, ->43
   30    50    >   ECHO                                                     'INSERT+INTO+%60following_pivot%60+%28%60uid%60%2C+%60fid%60%29+VALUES+'
   31    51      > FE_RESET_R                                       $35     !0, ->77
         52    > > FE_FETCH_R                                       ~36     $35, !5, ->77
         53    >   ASSIGN                                                   !6, ~36
   32    54      > FE_RESET_R                                       $38     !5, ->75
         55    > > FE_FETCH_R                                               $38, !7, ->75
   33    56    >   ECHO                                                     '%28'
         57        ECHO                                                     !6
         58        ECHO                                                     '%2C'
         59        ECHO                                                     !7
         60        ECHO                                                     '%29'
   34    61        INIT_FCALL                                               'end'
         62        SEND_REF                                                 !0
         63        DO_ICALL                                         $39     
         64        IS_IDENTICAL                                     ~40     !5, $39
         65      > JMPZ_EX                                          ~40     ~40, ->71
         66    >   INIT_FCALL                                               'end'
         67        SEND_REF                                                 !5
         68        DO_ICALL                                         $41     
         69        IS_IDENTICAL                                     ~42     !7, $41
         70        BOOL                                             ~40     ~42
         71    > > JMPZ                                                     ~40, ->73
         72    > > JMP                                                      ->74
   35    73    >   ECHO                                                     '%2C'
   32    74    > > JMP                                                      ->55
         75    >   FE_FREE                                                  $38
   31    76      > JMP                                                      ->52
         77    >   FE_FREE                                                  $35
   40    78        ECHO                                                     '%3B'
         79      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.72 ms | 1404 KiB | 21 Q