3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); class StrawPoll { public function __construct() { } public function vote($id, array $votes, $amount = 10, $proxyList = null, $timeout = 5) { $mh = curl_multi_init(); $chs = array(); if(is_file($proxyList)) { $parts = pathinfo($proxyList); $json = false; if($parts['extension'] == 'json') { $proxies = json_decode(file_get_contents($proxyList), true); if($proxies) { $json = true; } else { return 'Malformed JSON in ' . $proxyList; } } else { $proxies = file($proxyList); } } $post = array( 'id' => $id, 'votes' => $votes ); $post = http_build_query($post); $headers = array( 'Origin: http://strawpoll.me', 'If-None-Match: 6bbfd', 'X-Requested-With: XMLHttpRequest' ); $loop = false; if($amount == -1) { $loop = true; $amount = 25; } if(isset($proxies)) { $amount = count($proxies); } $used = array(); for($i = 0; $i < $amount; $i++) { $ch = $this->makeCurl('http://strawpoll.me/ajax/vote'); $chs[] = $ch; if(isset($proxies)) { if(count($proxies) < 1) { echo 'Out of proxies :(' . PHP_EOL; break; } $key = array_rand($proxies); $proxy = $proxies[$key]; unset($proxies[$key]); $proxyType = CURLPROXY_HTTP; if(!$json) { $proxy = trim($proxy); $parts = explode(':', $proxy); if(isset($parts[0], $parts[1])) { $proxyIP = $parts[0]; $proxyPort = $parts[1]; } else { $i--; continue; } if(isset($parts[2])) { $proxyType = strtoupper($proxyType) == 'SOCKS5' ? CURLPROXY_SOCKS5 : CURLPROXY_HTTP; } } else if($json && isset($proxy['ip'], $proxy['port'])) { $proxyIP = $proxy['ip']; $proxyPort = $proxy['port']; if(isset($proxy['type'])) { $proxyType = strtoupper($proxy['type']) == 'SOCKS5' ? CURLPROXY_SOCKS5 : CURLPROXY_HTTP; } } if(isset($used[$proxyIP])) { $i--; continue; } $used[$proxyIP] = true; if(!filter_var($proxyIP, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) || (!ctype_digit($proxyPort) || ($proxyPort < 0 || $proxyPort > 65535))) { $i--; continue; } curl_setopt_array($ch, array( CURLOPT_PROXY => $proxyIP . ':' . $proxyPort, CURLOPT_PROXYTYPE => $proxyType )); } curl_setopt_array($ch, array( CURLOPT_POSTFIELDS => $post, CURLOPT_POST => true, CURLOPT_HTTPHEADER => $headers, CURLOPT_REFERER => 'http://strawpoll.me/' . $id, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36', CURLOPT_TIMEOUT => $timeout )); curl_multi_add_handle($mh, $ch); } $running = null; $votes = 0; $results = array(); do { while(($exec = curl_multi_exec($mh, $running)) == CURLM_CALL_MULTI_PERFORM); if($exec != CURLM_OK) { break; } while($ch = curl_multi_info_read($mh)) { $ch = $ch['handle']; $error = curl_error($ch); if(!$error) { $out = curl_multi_getcontent($ch); $out = json_decode($out, true); if(!isset($out['success'])) { echo 'Didn\'t vote. Invalid response.' . PHP_EOL; } else { if($out['success'] == true) { $votes++; echo 'Voted' . PHP_EOL; } else { echo 'Didn\'t vote: ' . $out['error'] . PHP_EOL; } } $results[] = $out; } else { $results[] = $error; echo $error . PHP_EOL; } curl_multi_remove_handle($mh, $ch); curl_close($ch); } } while($running); curl_multi_close($mh); if($loop) { $this->vote($id, $votes, $amount, $proxyList, $timeout); return array('results' => $results, 'votes' => $votes); } return array('results' => $results, 'votes' => $votes, 'total' => $amount); } public function makeCurl($url) { $cookie = dirname(__FILE__) . '/strawpoll.txt'; $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_COOKIEFILE => $cookie, CURLOPT_COOKIEJAR => $cookie )); return $ch; } } $sp = new StrawPoll(); $votes = $sp->vote(123456789, array(0), 5000, 'proxies.txt', 30); //id , options , amt , proxy list , timeout echo 'Successfully voted ' . $votes['votes'] . '/' . $votes['total'] . ' times(s)';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsjQo
function name:  (null)
number of ops:  22
compiled vars:  !0 = $sp, !1 = $votes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_time_limit'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
  155     3        NEW                                              $3      'StrawPoll'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
  156     6        INIT_METHOD_CALL                                         !0, 'vote'
          7        SEND_VAL_EX                                              123456789
          8        SEND_VAL_EX                                              <array>
          9        SEND_VAL_EX                                              5000
         10        SEND_VAL_EX                                              'proxies.txt'
         11        SEND_VAL_EX                                              30
         12        DO_FCALL                                      0  $6      
         13        ASSIGN                                                   !1, $6
  158    14        FETCH_DIM_R                                      ~8      !1, 'votes'
         15        CONCAT                                           ~9      'Successfully+voted+', ~8
         16        CONCAT                                           ~10     ~9, '%2F'
         17        FETCH_DIM_R                                      ~11     !1, 'total'
         18        CONCAT                                           ~12     ~10, ~11
         19        CONCAT                                           ~13     ~12, '+times%28s%29'
         20        ECHO                                                     ~13
         21      > RETURN                                                   1

Class StrawPoll:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsjQo
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function __construct

Function vote:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 39
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 35
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 52
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
2 jumps found. (Code = 44) Position 1 = 204, Position 2 = 59
Branch analysis from position: 204
1 jumps found. (Code = 42) Position 1 = 208
Branch analysis from position: 208
2 jumps found. (Code = 44) Position 1 = 216, Position 2 = 208
Branch analysis from position: 216
2 jumps found. (Code = 43) Position 1 = 219, Position 2 = 220
Branch analysis from position: 219
1 jumps found. (Code = 42) Position 1 = 273
Branch analysis from position: 273
2 jumps found. (Code = 43) Position 1 = 277, Position 2 = 287
Branch analysis from position: 277
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 287
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 220
1 jumps found. (Code = 42) Position 1 = 267
Branch analysis from position: 267
2 jumps found. (Code = 44) Position 1 = 272, Position 2 = 221
Branch analysis from position: 272
2 jumps found. (Code = 44) Position 1 = 273, Position 2 = 207
Branch analysis from position: 273
Branch analysis from position: 207
Branch analysis from position: 221
2 jumps found. (Code = 43) Position 1 = 229, Position 2 = 256
Branch analysis from position: 229
2 jumps found. (Code = 43) Position 1 = 241, Position 2 = 243
Branch analysis from position: 241
1 jumps found. (Code = 42) Position 1 = 253
Branch analysis from position: 253
1 jumps found. (Code = 42) Position 1 = 260
Branch analysis from position: 260
2 jumps found. (Code = 44) Position 1 = 272, Position 2 = 221
Branch analysis from position: 272
Branch analysis from position: 221
Branch analysis from position: 243
2 jumps found. (Code = 43) Position 1 = 246, Position 2 = 249
Branch analysis from position: 246
1 jumps found. (Code = 42) Position 1 = 253
Branch analysis from position: 253
Branch analysis from position: 249
1 jumps found. (Code = 42) Position 1 = 260
Branch analysis from position: 260
Branch analysis from position: 256
2 jumps found. (Code = 44) Position 1 = 272, Position 2 = 221
Branch analysis from position: 272
Branch analysis from position: 221
Branch analysis from position: 208
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 180
Branch analysis from position: 67
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 204
Branch analysis from position: 204
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 118
Branch analysis from position: 83
2 jumps found. (Code = 46) Position 1 = 94, Position 2 = 96
Branch analysis from position: 94
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 102
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 104
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 106, Position 2 = 117
Branch analysis from position: 106
2 jumps found. (Code = 43) Position 1 = 111, Position 2 = 114
Branch analysis from position: 111
1 jumps found. (Code = 42) Position 1 = 116
Branch analysis from position: 116
1 jumps found. (Code = 42) Position 1 = 143
Branch analysis from position: 143
2 jumps found. (Code = 43) Position 1 = 145, Position 2 = 147
Branch analysis from position: 145
1 jumps found. (Code = 42) Position 1 = 201
Branch analysis from position: 201
2 jumps found. (Code = 44) Position 1 = 204, Position 2 = 59
Branch analysis from position: 204
Branch analysis from position: 59
Branch analysis from position: 147
2 jumps found. (Code = 47) Position 1 = 156, Position 2 = 167
Branch analysis from position: 156
2 jumps found. (Code = 47) Position 1 = 161, Position 2 = 166
Branch analysis from position: 161
2 jumps found. (Code = 47) Position 1 = 163, Position 2 = 165
Branch analysis from position: 163
2 jumps found. (Code = 43) Position 1 = 168, Position 2 = 170
Branch analysis from position: 168
1 jumps found. (Code = 42) Position 1 = 201
Branch analysis from position: 201
Branch analysis from position: 170
2 jumps found. (Code = 44) Position 1 = 204, Position 2 = 59
Branch analysis from position: 204
Branch analysis from position: 59
Branch analysis from position: 165
Branch analysis from position: 166
Branch analysis from position: 167
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 143
Branch analysis from position: 143
Branch analysis from position: 117
Branch analysis from position: 102
1 jumps found. (Code = 42) Position 1 = 201
Branch analysis from position: 201
Branch analysis from position: 96
Branch analysis from position: 118
2 jumps found. (Code = 46) Position 1 = 119, Position 2 = 124
Branch analysis from position: 119
2 jumps found. (Code = 46) Position 1 = 121, Position 2 = 123
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 125, Position 2 = 143
Branch analysis from position: 125
2 jumps found. (Code = 43) Position 1 = 131, Position 2 = 143
Branch analysis from position: 131
2 jumps found. (Code = 43) Position 1 = 137, Position 2 = 140
Branch analysis from position: 137
1 jumps found. (Code = 42) Position 1 = 142
Branch analysis from position: 142
2 jumps found. (Code = 43) Position 1 = 145, Position 2 = 147
Branch analysis from position: 145
Branch analysis from position: 147
Branch analysis from position: 140
2 jumps found. (Code = 43) Position 1 = 145, Position 2 = 147
Branch analysis from position: 145
Branch analysis from position: 147
Branch analysis from position: 143
Branch analysis from position: 143
Branch analysis from position: 123
Branch analysis from position: 124
Branch analysis from position: 180
Branch analysis from position: 56
Branch analysis from position: 52
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 52
Branch analysis from position: 50
Branch analysis from position: 52
Branch analysis from position: 39
filename:       /in/BsjQo
function name:  vote
number of ops:  292
compiled vars:  !0 = $id, !1 = $votes, !2 = $amount, !3 = $proxyList, !4 = $timeout, !5 = $mh, !6 = $chs, !7 = $parts, !8 = $json, !9 = $proxies, !10 = $post, !11 = $headers, !12 = $loop, !13 = $used, !14 = $i, !15 = $ch, !16 = $key, !17 = $proxy, !18 = $proxyType, !19 = $proxyIP, !20 = $proxyPort, !21 = $running, !22 = $results, !23 = $exec, !24 = $error, !25 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      10
          3        RECV_INIT                                        !3      null
          4        RECV_INIT                                        !4      5
    8     5        INIT_FCALL_BY_NAME                                       'curl_multi_init'
          6        DO_FCALL                                      0  $26     
          7        ASSIGN                                                   !5, $26
    9     8        ASSIGN                                                   !6, <array>
   10     9        INIT_FCALL                                               'is_file'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $29     
         12      > JMPZ                                                     $29, ->39
   11    13    >   INIT_FCALL                                               'pathinfo'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $30     
         16        ASSIGN                                                   !7, $30
   12    17        ASSIGN                                                   !8, <false>
   13    18        FETCH_DIM_R                                      ~33     !7, 'extension'
         19        IS_EQUAL                                                 ~33, 'json'
         20      > JMPZ                                                     ~34, ->35
   14    21    >   INIT_FCALL                                               'json_decode'
         22        INIT_FCALL                                               'file_get_contents'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $35     
         25        SEND_VAR                                                 $35
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $36     
         28        ASSIGN                                                   !9, $36
   15    29      > JMPZ                                                     !9, ->32
   16    30    >   ASSIGN                                                   !8, <true>
         31      > JMP                                                      ->34
   18    32    >   CONCAT                                           ~39     'Malformed+JSON+in+', !3
         33      > RETURN                                                   ~39
         34    > > JMP                                                      ->39
   21    35    >   INIT_FCALL                                               'file'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                         $40     
         38        ASSIGN                                                   !9, $40
   25    39    >   INIT_ARRAY                                       ~42     !0, 'id'
   26    40        ADD_ARRAY_ELEMENT                                ~42     !1, 'votes'
   24    41        ASSIGN                                                   !10, ~42
   28    42        INIT_FCALL                                               'http_build_query'
         43        SEND_VAR                                                 !10
         44        DO_ICALL                                         $44     
         45        ASSIGN                                                   !10, $44
   29    46        ASSIGN                                                   !11, <array>
   34    47        ASSIGN                                                   !12, <false>
   35    48        IS_EQUAL                                                 !2, -1
         49      > JMPZ                                                     ~48, ->52
   36    50    >   ASSIGN                                                   !12, <true>
   37    51        ASSIGN                                                   !2, 25
   39    52    >   ISSET_ISEMPTY_CV                                         !9
         53      > JMPZ                                                     ~51, ->56
   40    54    >   COUNT                                            ~52     !9
         55        ASSIGN                                                   !2, ~52
   42    56    >   ASSIGN                                                   !13, <array>
   43    57        ASSIGN                                                   !14, 0
         58      > JMP                                                      ->202
   44    59    >   INIT_METHOD_CALL                                         'makeCurl'
         60        SEND_VAL_EX                                              'http%3A%2F%2Fstrawpoll.me%2Fajax%2Fvote'
         61        DO_FCALL                                      0  $56     
         62        ASSIGN                                                   !15, $56
   45    63        ASSIGN_DIM                                               !6
         64        OP_DATA                                                  !15
   46    65        ISSET_ISEMPTY_CV                                         !9
         66      > JMPZ                                                     ~59, ->180
   47    67    >   COUNT                                            ~60     !9
         68        IS_SMALLER                                               ~60, 1
         69      > JMPZ                                                     ~61, ->72
   48    70    >   ECHO                                                     'Out+of+proxies+%3A%28%0A'
   49    71      > JMP                                                      ->204
   51    72    >   INIT_FCALL                                               'array_rand'
         73        SEND_VAR                                                 !9
         74        DO_ICALL                                         $62     
         75        ASSIGN                                                   !16, $62
   52    76        FETCH_DIM_R                                      ~64     !9, !16
         77        ASSIGN                                                   !17, ~64
   53    78        UNSET_DIM                                                !9, !16
   54    79        FETCH_CONSTANT                                   ~66     'CURLPROXY_HTTP'
         80        ASSIGN                                                   !18, ~66
   55    81        BOOL_NOT                                         ~68     !8
         82      > JMPZ                                                     ~68, ->118
   56    83    >   INIT_FCALL                                               'trim'
         84        SEND_VAR                                                 !17
         85        DO_ICALL                                         $69     
         86        ASSIGN                                                   !17, $69
   57    87        INIT_FCALL                                               'explode'
         88        SEND_VAL                                                 '%3A'
         89        SEND_VAR                                                 !17
         90        DO_ICALL                                         $71     
         91        ASSIGN                                                   !7, $71
   58    92        ISSET_ISEMPTY_DIM_OBJ                         0  ~73     !7, 0
         93      > JMPZ_EX                                          ~73     ~73, ->96
         94    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~74     !7, 1
         95        BOOL                                             ~73     ~74
         96    > > JMPZ                                                     ~73, ->102
   59    97    >   FETCH_DIM_R                                      ~75     !7, 0
         98        ASSIGN                                                   !19, ~75
   60    99        FETCH_DIM_R                                      ~77     !7, 1
        100        ASSIGN                                                   !20, ~77
        101      > JMP                                                      ->104
   62   102    >   PRE_DEC                                                  !14
   63   103      > JMP                                                      ->201
   65   104    >   ISSET_ISEMPTY_DIM_OBJ                         0          !7, 2
        105      > JMPZ                                                     ~80, ->117
   66   106    >   INIT_FCALL                                               'strtoupper'
        107        SEND_VAR                                                 !18
        108        DO_ICALL                                         $81     
        109        IS_EQUAL                                                 $81, 'SOCKS5'
        110      > JMPZ                                                     ~82, ->114
        111    >   FETCH_CONSTANT                                   ~83     'CURLPROXY_SOCKS5'
        112        QM_ASSIGN                                        ~84     ~83
        113      > JMP                                                      ->116
        114    >   FETCH_CONSTANT                                   ~85     'CURLPROXY_HTTP'
        115        QM_ASSIGN                                        ~84     ~85
        116    >   ASSIGN                                                   !18, ~84
        117    > > JMP                                                      ->143
   68   118    > > JMPZ_EX                                          ~87     !8, ->124
        119    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~88     !17, 'ip'
        120      > JMPZ_EX                                          ~88     ~88, ->123
        121    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~89     !17, 'port'
        122        BOOL                                             ~88     ~89
        123    >   BOOL                                             ~87     ~88
        124    > > JMPZ                                                     ~87, ->143
   69   125    >   FETCH_DIM_R                                      ~90     !17, 'ip'
        126        ASSIGN                                                   !19, ~90
   70   127        FETCH_DIM_R                                      ~92     !17, 'port'
        128        ASSIGN                                                   !20, ~92
   71   129        ISSET_ISEMPTY_DIM_OBJ                         0          !17, 'type'
        130      > JMPZ                                                     ~94, ->143
   72   131    >   INIT_FCALL                                               'strtoupper'
        132        FETCH_DIM_R                                      ~95     !17, 'type'
        133        SEND_VAL                                                 ~95
        134        DO_ICALL                                         $96     
        135        IS_EQUAL                                                 $96, 'SOCKS5'
        136      > JMPZ                                                     ~97, ->140
        137    >   FETCH_CONSTANT                                   ~98     'CURLPROXY_SOCKS5'
        138        QM_ASSIGN                                        ~99     ~98
        139      > JMP                                                      ->142
        140    >   FETCH_CONSTANT                                   ~100    'CURLPROXY_HTTP'
        141        QM_ASSIGN                                        ~99     ~100
        142    >   ASSIGN                                                   !18, ~99
   75   143    >   ISSET_ISEMPTY_DIM_OBJ                         0          !13, !19
        144      > JMPZ                                                     ~102, ->147
   76   145    >   PRE_DEC                                                  !14
   77   146      > JMP                                                      ->201
   79   147    >   ASSIGN_DIM                                               !13, !19
        148        OP_DATA                                                  <true>
   80   149        INIT_FCALL                                               'filter_var'
        150        SEND_VAR                                                 !19
        151        SEND_VAL                                                 275
   81   152        SEND_VAL                                                 12582912
        153        DO_ICALL                                         $105    
        154        BOOL_NOT                                         ~106    $105
        155      > JMPNZ_EX                                         ~106    ~106, ->167
   82   156    >   INIT_FCALL                                               'ctype_digit'
        157        SEND_VAR                                                 !20
        158        DO_ICALL                                         $107    
        159        BOOL_NOT                                         ~108    $107
        160      > JMPNZ_EX                                         ~108    ~108, ->166
        161    >   IS_SMALLER                                       ~109    !20, 0
        162      > JMPNZ_EX                                         ~109    ~109, ->165
        163    >   IS_SMALLER                                       ~110    65535, !20
        164        BOOL                                             ~109    ~110
        165    >   BOOL                                             ~108    ~109
        166    >   BOOL                                             ~106    ~108
        167    > > JMPZ                                                     ~106, ->170
   83   168    >   PRE_DEC                                                  !14
   84   169      > JMP                                                      ->201
   86   170    >   INIT_FCALL_BY_NAME                                       'curl_setopt_array'
        171        SEND_VAR_EX                                              !15
   87   172        FETCH_CONSTANT                                   ~112    'CURLOPT_PROXY'
        173        CONCAT                                           ~113    !19, '%3A'
        174        CONCAT                                           ~114    ~113, !20
        175        INIT_ARRAY                                       ~115    ~114, ~112
   88   176        FETCH_CONSTANT                                   ~116    'CURLOPT_PROXYTYPE'
        177        ADD_ARRAY_ELEMENT                                ~115    !18, ~116
        178        SEND_VAL_EX                                              ~115
        179        DO_FCALL                                      0          
   91   180    >   INIT_FCALL_BY_NAME                                       'curl_setopt_array'
        181        SEND_VAR_EX                                              !15
   92   182        FETCH_CONSTANT                                   ~118    'CURLOPT_POSTFIELDS'
        183        INIT_ARRAY                                       ~119    !10, ~118
   93   184        FETCH_CONSTANT                                   ~120    'CURLOPT_POST'
   92   185        ADD_ARRAY_ELEMENT                                ~119    <true>, ~120
   94   186        FETCH_CONSTANT                                   ~121    'CURLOPT_HTTPHEADER'
        187        ADD_ARRAY_ELEMENT                                ~119    !11, ~121
   95   188        FETCH_CONSTANT                                   ~122    'CURLOPT_REFERER'
        189        CONCAT                                           ~123    'http%3A%2F%2Fstrawpoll.me%2F', !0
        190        ADD_ARRAY_ELEMENT                                ~119    ~123, ~122
   96   191        FETCH_CONSTANT                                   ~124    'CURLOPT_USERAGENT'
        192        ADD_ARRAY_ELEMENT                                ~119    'Mozilla%2F5.0+%28Windows+NT+6.3%3B+WOW64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F33.0.1750.146+Safari%2F537.36', ~124
   97   193        FETCH_CONSTANT                                   ~125    'CURLOPT_TIMEOUT'
        194        ADD_ARRAY_ELEMENT                                ~119    !4, ~125
        195        SEND_VAL_EX                                              ~119
        196        DO_FCALL                                      0          
   99   197        INIT_FCALL_BY_NAME                                       'curl_multi_add_handle'
        198        SEND_VAR_EX                                              !5
        199        SEND_VAR_EX                                              !15
        200        DO_FCALL                                      0          
   43   201    >   PRE_INC                                                  !14
        202    >   IS_SMALLER                                               !14, !2
        203      > JMPNZ                                                    ~129, ->59
  101   204    >   ASSIGN                                                   !21, null
  102   205        ASSIGN                                                   !1, 0
  103   206        ASSIGN                                                   !22, <array>
  105   207    > > JMP                                                      ->208
        208    >   INIT_FCALL_BY_NAME                                       'curl_multi_exec'
        209        SEND_VAR_EX                                              !5
        210        SEND_VAR_EX                                              !21
        211        DO_FCALL                                      0  $133    
        212        ASSIGN                                           ~134    !23, $133
        213        FETCH_CONSTANT                                   ~135    'CURLM_CALL_MULTI_PERFORM'
        214        IS_EQUAL                                                 ~134, ~135
        215      > JMPNZ                                                    ~136, ->208
  106   216    >   FETCH_CONSTANT                                   ~137    'CURLM_OK'
        217        IS_NOT_EQUAL                                             !23, ~137
        218      > JMPZ                                                     ~138, ->220
  107   219    > > JMP                                                      ->273
  109   220    > > JMP                                                      ->267
  110   221    >   FETCH_DIM_R                                      ~139    !15, 'handle'
        222        ASSIGN                                                   !15, ~139
  111   223        INIT_FCALL_BY_NAME                                       'curl_error'
        224        SEND_VAR_EX                                              !15
        225        DO_FCALL                                      0  $141    
        226        ASSIGN                                                   !24, $141
  112   227        BOOL_NOT                                         ~143    !24
        228      > JMPZ                                                     ~143, ->256
  113   229    >   INIT_FCALL_BY_NAME                                       'curl_multi_getcontent'
        230        SEND_VAR_EX                                              !15
        231        DO_FCALL                                      0  $144    
        232        ASSIGN                                                   !25, $144
  114   233        INIT_FCALL                                               'json_decode'
        234        SEND_VAR                                                 !25
        235        SEND_VAL                                                 <true>
        236        DO_ICALL                                         $146    
        237        ASSIGN                                                   !25, $146
  115   238        ISSET_ISEMPTY_DIM_OBJ                         0  ~148    !25, 'success'
        239        BOOL_NOT                                         ~149    ~148
        240      > JMPZ                                                     ~149, ->243
  116   241    >   ECHO                                                     'Didn%27t+vote.+Invalid+response.%0A'
        242      > JMP                                                      ->253
  118   243    >   FETCH_DIM_R                                      ~150    !25, 'success'
        244        BOOL                                             ~151    ~150
        245      > JMPZ                                                     ~151, ->249
  119   246    >   PRE_INC                                                  !1
  120   247        ECHO                                                     'Voted%0A'
        248      > JMP                                                      ->253
  122   249    >   FETCH_DIM_R                                      ~153    !25, 'error'
        250        CONCAT                                           ~154    'Didn%27t+vote%3A+', ~153
        251        CONCAT                                           ~155    ~154, '%0A'
        252        ECHO                                                     ~155
  125   253    >   ASSIGN_DIM                                               !22
        254        OP_DATA                                                  !25
        255      > JMP                                                      ->260
  127   256    >   ASSIGN_DIM                                               !22
        257        OP_DATA                                                  !24
  128   258        CONCAT                                           ~158    !24, '%0A'
        259        ECHO                                                     ~158
  130   260    >   INIT_FCALL_BY_NAME                                       'curl_multi_remove_handle'
        261        SEND_VAR_EX                                              !5
        262        SEND_VAR_EX                                              !15
        263        DO_FCALL                                      0          
  131   264        INIT_FCALL_BY_NAME                                       'curl_close'
        265        SEND_VAR_EX                                              !15
        266        DO_FCALL           

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.67 ms | 1428 KiB | 39 Q