3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.06 ms | 1392 KiB | 17 Q