3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); error_reporting(E_ALL); ini_set('display_errors', 1); ob_implicit_flush(true); ob_end_flush(); /** CONFIG -------------------------------------------------------------------- */ $run = 1000; // Kolikrát se má provést hlasování? $idStart = 190200; // Id od kterého se začne $idEnd = 192000; // Id u kterého se skončí /** --------------------------------------------------------------------------- */ function dlog($msg, $color = 'black') { print('<span style="color: ' . $color . '">[' . date('H:i:s') . '] - ' . $msg . '</span><br />'); } function goVote($idStart, $idEnd, $r) { $GLOBALS['firstRun'] = false; for ($i = $idStart; $i <= $idEnd; $i++) { $opts = array( 'http' => array( 'method' => 'GET', 'user_agent' => md5(time()) . rand(6713678, 8746316834) . rand(6713678, 8746316834) ) ); $context = stream_context_create($opts); $result = file_get_contents('http://agata.suz.cvut.cz/jidelnicky/rating_process.php?id=' . $i . '&rating=5', 0, $context); if ($result == 'already_voted') { $color = "red"; } elseif (is_numeric($result)) { $color = "green"; } else { $color = "orange"; } dlog('[ID:' . $i . '][RUN: ' . $r . '] - result: ' . $result, $color); } return true; } /** --------------------------------------------------------------------------- */ for ($r = 1; $r <= $run; $r++) { goVote($idStart, $idEnd, $r); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 20
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 20
Branch analysis from position: 28
Branch analysis from position: 20
filename:       /in/NUsKb
function name:  (null)
number of ops:  29
compiled vars:  !0 = $run, !1 = $idStart, !2 = $idEnd, !3 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_time_limit'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'error_reporting'
          4        SEND_VAL                                                 32767
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'ini_set'
          7        SEND_VAL                                                 'display_errors'
          8        SEND_VAL                                                 1
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'ob_implicit_flush'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'ob_end_flush'
         14        DO_ICALL                                                 
    9    15        ASSIGN                                                   !0, 1000
   10    16        ASSIGN                                                   !1, 190200
   11    17        ASSIGN                                                   !2, 192000
   53    18        ASSIGN                                                   !3, 1
         19      > JMP                                                      ->26
   55    20    >   INIT_FCALL                                               'govote'
         21        SEND_VAR                                                 !1
         22        SEND_VAR                                                 !2
         23        SEND_VAR                                                 !3
         24        DO_FCALL                                      0          
   53    25        PRE_INC                                                  !3
         26    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         27      > JMPNZ                                                    ~15, ->20
   56    28    > > RETURN                                                   1

Function dlog:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUsKb
function name:  dlog
number of ops:  13
compiled vars:  !0 = $msg, !1 = $color
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'black'
   16     2        CONCAT                                           ~2      '%3Cspan+style%3D%22color%3A+', !1
          3        CONCAT                                           ~3      ~2, '%22%3E%5B'
          4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'H%3Ai%3As'
          6        DO_ICALL                                         $4      
          7        CONCAT                                           ~5      ~3, $4
          8        CONCAT                                           ~6      ~5, '%5D+-+'
          9        CONCAT                                           ~7      ~6, !0
         10        CONCAT                                           ~8      ~7, '%3C%2Fspan%3E%3Cbr+%2F%3E'
         11        ECHO                                                     ~8
   17    12      > RETURN                                                   null

End of function dlog

Function govote:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 8
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 8
Branch analysis from position: 62
Branch analysis from position: 8
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 49
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 8
Branch analysis from position: 62
Branch analysis from position: 8
filename:       /in/NUsKb
function name:  goVote
number of ops:  64
compiled vars:  !0 = $idStart, !1 = $idEnd, !2 = $r, !3 = $i, !4 = $opts, !5 = $context, !6 = $result, !7 = $color
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   21     3        FETCH_W                      global              $8      'GLOBALS'
          4        ASSIGN_DIM                                               $8, 'firstRun'
          5        OP_DATA                                                  <false>
   22     6        ASSIGN                                                   !3, !0
          7      > JMP                                                      ->60
   26     8    >   INIT_ARRAY                                       ~11     'GET', 'method'
   27     9        INIT_FCALL                                               'md5'
         10        INIT_FCALL                                               'time'
         11        DO_ICALL                                         $12     
         12        SEND_VAR                                                 $12
         13        DO_ICALL                                         $13     
         14        INIT_FCALL                                               'rand'
         15        SEND_VAL                                                 6713678
         16        SEND_VAL                                                 8746316834
         17        DO_ICALL                                         $14     
         18        CONCAT                                           ~15     $13, $14
         19        INIT_FCALL                                               'rand'
         20        SEND_VAL                                                 6713678
         21        SEND_VAL                                                 8746316834
         22        DO_ICALL                                         $16     
         23        CONCAT                                           ~17     ~15, $16
         24        ADD_ARRAY_ELEMENT                                ~11     ~17, 'user_agent'
         25        INIT_ARRAY                                       ~18     ~11, 'http'
   24    26        ASSIGN                                                   !4, ~18
   30    27        INIT_FCALL                                               'stream_context_create'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                         $20     
         30        ASSIGN                                                   !5, $20
   31    31        INIT_FCALL                                               'file_get_contents'
         32        CONCAT                                           ~22     'http%3A%2F%2Fagata.suz.cvut.cz%2Fjidelnicky%2Frating_process.php%3Fid%3D', !3
         33        CONCAT                                           ~23     ~22, '%26rating%3D5'
         34        SEND_VAL                                                 ~23
         35        SEND_VAL                                                 0
         36        SEND_VAR                                                 !5
         37        DO_ICALL                                         $24     
         38        ASSIGN                                                   !6, $24
   33    39        IS_EQUAL                                                 !6, 'already_voted'
         40      > JMPZ                                                     ~26, ->43
   35    41    >   ASSIGN                                                   !7, 'red'
         42      > JMP                                                      ->50
   37    43    >   INIT_FCALL                                               'is_numeric'
         44        SEND_VAR                                                 !6
         45        DO_ICALL                                         $28     
         46      > JMPZ                                                     $28, ->49
   39    47    >   ASSIGN                                                   !7, 'green'
         48      > JMP                                                      ->50
   43    49    >   ASSIGN                                                   !7, 'orange'
   46    50    >   INIT_FCALL                                               'dlog'
         51        CONCAT                                           ~31     '%5BID%3A', !3
         52        CONCAT                                           ~32     ~31, '%5D%5BRUN%3A+'
         53        CONCAT                                           ~33     ~32, !2
         54        CONCAT                                           ~34     ~33, '%5D+-+result%3A+'
         55        CONCAT                                           ~35     ~34, !6
         56        SEND_VAL                                                 ~35
         57        SEND_VAR                                                 !7
         58        DO_FCALL                                      0          
   22    59        PRE_INC                                                  !3
         60    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         61      > JMPNZ                                                    ~38, ->8
   49    62    > > RETURN                                                   <true>
   50    63*     > RETURN                                                   null

End of function govote

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.66 ms | 1407 KiB | 39 Q