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 ","; } else { echo "here!!"; } } 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
1 jumps found. (Code = 62) Position 1 = -2
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/2BUvk
function name:  (null)
number of ops:  38
compiled vars:  !0 = $pivot, !1 = $n, !2 = $i, !3 = $user, !4 = $rand
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                                                    ~10, ->4
   12     9    >   ASSIGN                                                   !2, 1
         10      > JMP                                                      ->32
   13    11    >   FETCH_DIM_W                                      $12     !0, !2
         12        ASSIGN_REF                                               !3, $12
   14    13        INIT_FCALL                                               'rand'
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 20
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !4, $14
   15    18      > JMP                                                      ->20
   16    19    >   PRE_INC                                                  !4
   15    20    >   ARRAY_KEY_EXISTS                                 ~17     !4, !3
         21      > JMPNZ_EX                                         ~17     ~17, ->24
         22    >   IS_EQUAL                                         ~18     !4, !2
         23        BOOL                                             ~17     ~18
         24    > > JMPNZ                                                    ~17, ->19
   19    25    >   ASSIGN_DIM                                               !3
         26        OP_DATA                                                  !4
   21    27        IS_EQUAL                                                 !1, 10
         28      > JMPZ                                                     ~20, ->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                                                    ~24, ->11
   40    34    >   INIT_FCALL                                               'print_r'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.64 ms | 1405 KiB | 17 Q