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 = rand(0, 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, ")"; echo ","; var_dump($pi === end($piv)); } /*if($pi !== end($piv) && $piv !== end($pivot)) { echo ","; } else { echo "god damn"; } */ } 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 = 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 = 72
Branch analysis from position: 52
2 jumps found. (Code = 78) Position 1 = 53, Position 2 = 72
Branch analysis from position: 53
2 jumps found. (Code = 77) Position 1 = 55, Position 2 = 70
Branch analysis from position: 55
2 jumps found. (Code = 78) Position 1 = 56, Position 2 = 70
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 70
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
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/g8ac8
function name:  (null)
number of ops:  75
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                                                      ->39
   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                                                      ->24
   16    19    >   INIT_FCALL                                               'rand'
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 20
         22        DO_ICALL                                         $19     
         23        ASSIGN                                                   !4, $19
   15    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
   19    32    >   ASSIGN_DIM                                               !3
         33        OP_DATA                                                  !4
   21    34        IS_EQUAL                                                 !1, 10
         35      > JMPZ                                                     ~25, ->38
   22    36    >   PRE_INC                                                  !2
   23    37        ASSIGN                                                   !1, 0
   12    38    >   PRE_INC                                                  !1
         39    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         40      > JMPNZ                                                    ~29, ->11
   27    41    >   ASSIGN                                                   !2, 1
         42      > JMP                                                      ->48
   28    43    >   INIT_FCALL                                               'natsort'
         44        FETCH_DIM_W                                      $31     !0, !2
         45        SEND_REF                                                 $31
         46        DO_ICALL                                                 
   27    47        PRE_INC                                                  !2
         48    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         49      > JMPNZ                                                    ~34, ->43
   31    50    >   ECHO                                                     'INSERT+INTO+%60following_pivot%60+%28%60uid%60%2C+%60fid%60%29+VALUES+'
   32    51      > FE_RESET_R                                       $35     !0, ->72
         52    > > FE_FETCH_R                                       ~36     $35, !5, ->72
         53    >   ASSIGN                                                   !6, ~36
   33    54      > FE_RESET_R                                       $38     !5, ->70
         55    > > FE_FETCH_R                                               $38, !7, ->70
   34    56    >   ECHO                                                     '%28'
         57        ECHO                                                     !6
         58        ECHO                                                     '%2C'
         59        ECHO                                                     !7
         60        ECHO                                                     '%29'
   35    61        ECHO                                                     '%2C'
   36    62        INIT_FCALL                                               'var_dump'
         63        INIT_FCALL                                               'end'
         64        SEND_REF                                                 !5
         65        DO_ICALL                                         $39     
         66        IS_IDENTICAL                                     ~40     !7, $39
         67        SEND_VAL                                                 ~40
         68        DO_ICALL                                                 
   33    69      > JMP                                                      ->55
         70    >   FE_FREE                                                  $38
   32    71      > JMP                                                      ->52
         72    >   FE_FREE                                                  $35
   44    73        ECHO                                                     '%3B'
   45    74      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.78 ms | 1404 KiB | 23 Q