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(0, 20); while(array_key_exists($rand, $user) || $rand == $i) { $rand++; } $user[] = $rand; if($n == 10) { $i++; $n = 0; } } echo "INSERT INTO `following_pivot` (`uid`, `fid`) VALUES "; foreach($pivot as $key => $piv) { foreach($piv as $pi) { echo "(", $key, ",", $pi, ")"; if($pi !== end($piv) && $piv !== end($pivot)) { echo "here"; echo ","; } } echo ","; } echo ";"; //print_r($pivot);
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 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 11
Branch analysis from position: 34
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 62
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 62
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 59
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 59
Branch analysis from position: 40
2 jumps found. (Code = 46) Position 1 = 50, Position 2 = 55
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 58
Branch analysis from position: 55
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 59
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 19
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 11
Branch analysis from position: 34
Branch analysis from position: 11
Branch analysis from position: 31
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
Branch analysis from position: 24
Branch analysis from position: 24
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/lJotT
function name:  (null)
number of ops:  65
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
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 0
    8     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->7
    9     4    >   ASSIGN_DIM                                               !0, !2
          5        OP_DATA                                                  <array>
    8     6        PRE_INC                                                  !2
          7    >   IS_SMALLER_OR_EQUAL                                      !2, 20
          8      > JMPNZ                                                    ~13, ->4
   12     9    >   ASSIGN                                                   !2, 1
         10      > JMP                                                      ->32
   13    11    >   FETCH_DIM_W                                      $15     !0, !2
         12        ASSIGN_REF                                               !3, $15
   14    13        INIT_FCALL                                               'rand'
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 20
         16        DO_ICALL                                         $17     
         17        ASSIGN                                                   !4, $17
   15    18      > JMP                                                      ->20
   16    19    >   PRE_INC                                                  !4
   15    20    >   ARRAY_KEY_EXISTS                                 ~20     !4, !3
         21      > JMPNZ_EX                                         ~20     ~20, ->24
         22    >   IS_EQUAL                                         ~21     !4, !2
         23        BOOL                                             ~20     ~21
         24    > > JMPNZ                                                    ~20, ->19
   19    25    >   ASSIGN_DIM                                               !3
         26        OP_DATA                                                  !4
   21    27        IS_EQUAL                                                 !1, 10
         28      > JMPZ                                                     ~23, ->31
   22    29    >   PRE_INC                                                  !2
   23    30        ASSIGN                                                   !1, 0
   12    31    >   PRE_INC                                                  !1
         32    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         33      > JMPNZ                                                    ~27, ->11
   27    34    >   ECHO                                                     'INSERT+INTO+%60following_pivot%60+%28%60uid%60%2C+%60fid%60%29+VALUES+'
   28    35      > FE_RESET_R                                       $28     !0, ->62
         36    > > FE_FETCH_R                                       ~29     $28, !5, ->62
         37    >   ASSIGN                                                   !6, ~29
   29    38      > FE_RESET_R                                       $31     !5, ->59
         39    > > FE_FETCH_R                                               $31, !7, ->59
   30    40    >   ECHO                                                     '%28'
         41        ECHO                                                     !6
         42        ECHO                                                     '%2C'
         43        ECHO                                                     !7
         44        ECHO                                                     '%29'
   31    45        INIT_FCALL                                               'end'
         46        SEND_REF                                                 !5
         47        DO_ICALL                                         $32     
         48        IS_NOT_IDENTICAL                                 ~33     !7, $32
         49      > JMPZ_EX                                          ~33     ~33, ->55
         50    >   INIT_FCALL                                               'end'
         51        SEND_REF                                                 !0
         52        DO_ICALL                                         $34     
         53        IS_NOT_IDENTICAL                                 ~35     !5, $34
         54        BOOL                                             ~33     ~35
         55    > > JMPZ                                                     ~33, ->58
   32    56    >   ECHO                                                     'here'
   33    57        ECHO                                                     '%2C'
   29    58    > > JMP                                                      ->39
         59    >   FE_FREE                                                  $31
   36    60        ECHO                                                     '%2C'
   28    61      > JMP                                                      ->36
         62    >   FE_FREE                                                  $28
   39    63        ECHO                                                     '%3B'
   40    64      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.86 ms | 1392 KiB | 17 Q