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(in_array($rand, $user) || $rand == $i) { $rand++; } $user[] = $rand; if($n == 10) { $i++; $n = 0; } } foreach($pivot as $array) { natsort($array); } /*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 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 11
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 43
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
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 = 25, Position 2 = 27
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 19
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 11
Branch analysis from position: 37
Branch analysis from position: 11
Branch analysis from position: 34
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
Branch analysis from position: 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/V9fZQ
function name:  (null)
number of ops:  48
compiled vars:  !0 = $pivot, !1 = $n, !2 = $i, !3 = $user, !4 = $rand, !5 = $array
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                                                    ~11, ->4
   12     9    >   ASSIGN                                                   !2, 1
         10      > JMP                                                      ->35
   13    11    >   FETCH_DIM_W                                      $13     !0, !2
         12        ASSIGN_REF                                               !3, $13
   14    13        INIT_FCALL                                               'rand'
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 20
         16        DO_ICALL                                         $15     
         17        ASSIGN                                                   !4, $15
   15    18      > JMP                                                      ->20
   16    19    >   PRE_INC                                                  !4
   15    20    >   INIT_FCALL                                               'in_array'
         21        SEND_VAR                                                 !4
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $18     
         24      > JMPNZ_EX                                         ~19     $18, ->27
         25    >   IS_EQUAL                                         ~20     !4, !2
         26        BOOL                                             ~19     ~20
         27    > > JMPNZ                                                    ~19, ->19
   19    28    >   ASSIGN_DIM                                               !3
         29        OP_DATA                                                  !4
   21    30        IS_EQUAL                                                 !1, 10
         31      > JMPZ                                                     ~22, ->34
   22    32    >   PRE_INC                                                  !2
   23    33        ASSIGN                                                   !1, 0
   12    34    >   PRE_INC                                                  !1
         35    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         36      > JMPNZ                                                    ~26, ->11
   28    37    > > FE_RESET_R                                       $27     !0, ->43
         38    > > FE_FETCH_R                                               $27, !5, ->43
   29    39    >   INIT_FCALL                                               'natsort'
         40        SEND_REF                                                 !5
         41        DO_ICALL                                                 
   28    42      > JMP                                                      ->38
         43    >   FE_FREE                                                  $27
   45    44        INIT_FCALL                                               'print_r'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                                 
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.81 ms | 1400 KiB | 21 Q