3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oCurl = curl_init( mb_substr( $sPath, 0, 4 ) == 'http' ? $sPath : 'https://qiwi.com/'.$sPath ); # Настройки cURL : echo curl_setopt_array( $oCurl, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_COOKIEJAR => $this->sCookieFile, CURLOPT_COOKIEFILE => $this->sCookieFile, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0', CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_HTTPHEADER => mb_substr( $sPath, 0, 4 ) == 'http' ? (is_null( $mPOST ) ? array( 'Accept: application/json, text/javascript, */*; q=0.01', 'X-Requested-With: XMLHttpRequest' ) : array( 'Content-Type: application/json; charset=UTF-8' )) : array( 'Accept: application/json, text/javascript, */*; q=0.01', 'X-Requested-With: XMLHttpRequest' ), ) ); # Если требуется отправить POST - запрос : if( is_array( $mPOST ) || $mPOST != '' || mb_substr( $sPath, 0, 4 ) != 'http' ) { # Настройки Curl подключения : curl_setopt_array( $oCurl, array( CURLOPT_POST => true, CURLOPT_POSTFIELDS => is_array( $mPOST ) ? http_build_query( $mPOST ) : $mPOST, ) ); } # Если существует реферер : if( !is_null( $sReferer ) ) curl_setopt( $oCurl, CURLOPT_REFERER, $sReferer ); # Если требуется указать дополнительные настройки : if( is_array( $aOptions ) && count( $aOptions ) ) curl_setopt_array( $oCurl, $aOptions ); # Получение ответа : $this->sResponse = curl_exec( $oCurl ); # Если произошла ошибка : if( curl_errno( $oCurl ) ) throw new Exception( curl_errno( $oCurl ).' - '.curl_error( $oCurl ) ); # Закрываем соединение : curl_close( $oCurl ); # Сохраняем страницу referer : $sReferer = mb_substr( $sPath, 0, 4 ) == 'http' ? $sPath : 'https://qiwi.com/'.$sPath; # Преобразование ответа в массив : $this->aResponse = json_decode( $this->sResponse, true ); if( json_last_error() != JSON_ERROR_NONE ) $this->aResponse = array(); return $this->sResponse;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 48
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
2 jumps found. (Code = 47) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
2 jumps found. (Code = 47) Position 1 = 58, Position 2 = 65
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 82
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 78
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 91
Branch analysis from position: 85
2 jumps found. (Code = 46) Position 1 = 93, Position 2 = 95
Branch analysis from position: 93
2 jumps found. (Code = 43) Position 1 = 96, Position 2 = 100
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 122
Branch analysis from position: 110
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 122
2 jumps found. (Code = 43) Position 1 = 132, Position 2 = 134
Branch analysis from position: 132
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
2 jumps found. (Code = 43) Position 1 = 150, Position 2 = 153
Branch analysis from position: 150
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 153
Branch analysis from position: 134
2 jumps found. (Code = 43) Position 1 = 150, Position 2 = 153
Branch analysis from position: 150
Branch analysis from position: 153
Branch analysis from position: 100
Branch analysis from position: 95
Branch analysis from position: 91
Branch analysis from position: 78
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 91
Branch analysis from position: 85
Branch analysis from position: 91
Branch analysis from position: 82
Branch analysis from position: 65
Branch analysis from position: 57
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 48
2 jumps found. (Code = 47) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
Branch analysis from position: 57
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 48
Branch analysis from position: 41
Branch analysis from position: 48
filename:       /in/pqZfA
function name:  (null)
number of ops:  157
compiled vars:  !0 = $oCurl, !1 = $sPath, !2 = $mPOST, !3 = $sReferer, !4 = $aOptions
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        INIT_FCALL                                               'mb_substr'
          2        SEND_VAR                                                 !1
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $5      
          6        IS_EQUAL                                                 $5, 'http'
          7      > JMPZ                                                     ~6, ->10
          8    >   QM_ASSIGN                                        ~7      !1
          9      > JMP                                                      ->12
         10    >   CONCAT                                           ~8      'https%3A%2F%2Fqiwi.com%2F', !1
         11        QM_ASSIGN                                        ~7      ~8
         12    >   SEND_VAL_EX                                              ~7
         13        DO_FCALL                                      0  $9      
         14        ASSIGN                                                   !0, $9
    6    15        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         16        SEND_VAR_EX                                              !0
    7    17        FETCH_CONSTANT                                   ~11     'CURLOPT_RETURNTRANSFER'
         18        INIT_ARRAY                                       ~12     <true>, ~11
    8    19        FETCH_CONSTANT                                   ~13     'CURLOPT_COOKIEJAR'
         20        FETCH_THIS                                       $14     
         21        FETCH_OBJ_R                                      ~15     $14, 'sCookieFile'
         22        ADD_ARRAY_ELEMENT                                ~12     ~15, ~13
    9    23        FETCH_CONSTANT                                   ~16     'CURLOPT_COOKIEFILE'
         24        FETCH_THIS                                       $17     
         25        FETCH_OBJ_R                                      ~18     $17, 'sCookieFile'
         26        ADD_ARRAY_ELEMENT                                ~12     ~18, ~16
   10    27        FETCH_CONSTANT                                   ~19     'CURLOPT_USERAGENT'
         28        ADD_ARRAY_ELEMENT                                ~12     'Mozilla%2F5.0+%28Windows+NT+6.1%3B+WOW64%3B+rv%3A39.0%29+Gecko%2F20100101+Firefox%2F39.0', ~19
   11    29        FETCH_CONSTANT                                   ~20     'CURLOPT_SSL_VERIFYPEER'
    7    30        ADD_ARRAY_ELEMENT                                ~12     <false>, ~20
   12    31        FETCH_CONSTANT                                   ~21     'CURLOPT_SSL_VERIFYHOST'
    7    32        ADD_ARRAY_ELEMENT                                ~12     <false>, ~21
   13    33        FETCH_CONSTANT                                   ~22     'CURLOPT_HTTPHEADER'
         34        INIT_FCALL                                               'mb_substr'
         35        SEND_VAR                                                 !1
         36        SEND_VAL                                                 0
         37        SEND_VAL                                                 4
         38        DO_ICALL                                         $23     
         39        IS_EQUAL                                                 $23, 'http'
         40      > JMPZ                                                     ~24, ->48
         41    >   TYPE_CHECK                                    2          !2
         42      > JMPZ                                                     ~25, ->45
    7    43    >   QM_ASSIGN                                        ~26     <array>
         44      > JMP                                                      ->46
         45    >   QM_ASSIGN                                        ~26     <array>
         46    >   QM_ASSIGN                                        ~27     ~26
         47      > JMP                                                      ->49
         48    >   QM_ASSIGN                                        ~27     <array>
         49    >   ADD_ARRAY_ELEMENT                                ~12     ~27, ~22
         50        SEND_VAL_EX                                              ~12
         51        DO_FCALL                                      0  $28     
         52        ECHO                                                     $28
   17    53        TYPE_CHECK                                  128  ~29     !2
         54      > JMPNZ_EX                                         ~29     ~29, ->57
         55    >   IS_NOT_EQUAL                                     ~30     !2, ''
         56        BOOL                                             ~29     ~30
         57    > > JMPNZ_EX                                         ~29     ~29, ->65
         58    >   INIT_FCALL                                               'mb_substr'
         59        SEND_VAR                                                 !1
         60        SEND_VAL                                                 0
         61        SEND_VAL                                                 4
         62        DO_ICALL                                         $31     
         63        IS_NOT_EQUAL                                     ~32     $31, 'http'
         64        BOOL                                             ~29     ~32
         65    > > JMPZ                                                     ~29, ->82
   20    66    >   INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         67        SEND_VAR_EX                                              !0
   21    68        FETCH_CONSTANT                                   ~33     'CURLOPT_POST'
         69        INIT_ARRAY                                       ~34     <true>, ~33
   22    70        FETCH_CONSTANT                                   ~35     'CURLOPT_POSTFIELDS'
         71        TYPE_CHECK                                  128          !2
         72      > JMPZ                                                     ~36, ->78
         73    >   INIT_FCALL                                               'http_build_query'
         74        SEND_VAR                                                 !2
         75        DO_ICALL                                         $37     
         76        QM_ASSIGN                                        ~38     $37
         77      > JMP                                                      ->79
         78    >   QM_ASSIGN                                        ~38     !2
         79    >   ADD_ARRAY_ELEMENT                                ~34     ~38, ~35
         80        SEND_VAL_EX                                              ~34
         81        DO_FCALL                                      0          
   27    82    >   TYPE_CHECK                                    2  ~40     !3
         83        BOOL_NOT                                         ~41     ~40
         84      > JMPZ                                                     ~41, ->91
   28    85    >   INIT_FCALL_BY_NAME                                       'curl_setopt'
         86        SEND_VAR_EX                                              !0
         87        FETCH_CONSTANT                                   ~42     'CURLOPT_REFERER'
         88        SEND_VAL_EX                                              ~42
         89        SEND_VAR_EX                                              !3
         90        DO_FCALL                                      0          
   31    91    >   TYPE_CHECK                                  128  ~44     !4
         92      > JMPZ_EX                                          ~44     ~44, ->95
         93    >   COUNT                                            ~45     !4
         94        BOOL                                             ~44     ~45
         95    > > JMPZ                                                     ~44, ->100
   32    96    >   INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         97        SEND_VAR_EX                                              !0
         98        SEND_VAR_EX                                              !4
         99        DO_FCALL                                      0          
   35   100    >   FETCH_THIS                                       $47     
        101        INIT_FCALL_BY_NAME                                       'curl_exec'
        102        SEND_VAR_EX                                              !0
        103        DO_FCALL                                      0  $49     
        104        ASSIGN_OBJ                                               $47, 'sResponse'
        105        OP_DATA                                                  $49
   38   106        INIT_FCALL_BY_NAME                                       'curl_errno'
        107        SEND_VAR_EX                                              !0
        108        DO_FCALL                                      0  $50     
        109      > JMPZ                                                     $50, ->122
   39   110    >   NEW                                              $51     'Exception'
        111        INIT_FCALL_BY_NAME                                       'curl_errno'
        112        SEND_VAR_EX                                              !0
        113        DO_FCALL                                      0  $52     
        114        CONCAT                                           ~53     $52, '+-+'
        115        INIT_FCALL_BY_NAME                                       'curl_error'
        116        SEND_VAR_EX                                              !0
        117        DO_FCALL                                      0  $54     
        118        CONCAT                                           ~55     ~53, $54
        119        SEND_VAL_EX                                              ~55
        120        DO_FCALL                                      0          
        121      > THROW                                         0          $51
   42   122    >   INIT_FCALL_BY_NAME                                       'curl_close'
        123        SEND_VAR_EX                                              !0
        124        DO_FCALL                                      0          
   45   125        INIT_FCALL                                               'mb_substr'
        126        SEND_VAR                                                 !1
        127        SEND_VAL                                                 0
        128        SEND_VAL                                                 4
        129        DO_ICALL                                         $58     
        130        IS_EQUAL                                                 $58, 'http'
        131      > JMPZ                                                     ~59, ->134
        132    >   QM_ASSIGN                                        ~60     !1
        133      > JMP                                                      ->136
        134    >   CONCAT                                           ~61     'https%3A%2F%2Fqiwi.com%2F', !1
        135        QM_ASSIGN                                        ~60     ~61
        136    >   ASSIGN                                                   !3, ~60
   48   137        FETCH_THIS                                       $63     
        138        INIT_FCALL                                               'json_decode'
        139        FETCH_THIS                                       $65     
        140        FETCH_OBJ_R                                      ~66     $65, 'sResponse'
        141        SEND_VAL                                                 ~66
        142        SEND_VAL                                                 <true>
        143        DO_ICALL                                         $67     
        144        ASSIGN_OBJ                                               $63, 'aResponse'
        145        OP_DATA                                                  $67
   49   146        INIT_FCALL                                               'json_last_error'
        147        DO_ICALL                                         $68     
        148        IS_NOT_EQUAL                                             $68, 0
        149      > JMPZ                                                     ~69, ->153
   50   150    >   FETCH_THIS                                       $70     
        151        ASSIGN_OBJ                                               $70, 'aResponse'
        152        OP_DATA                                                  <array>
   52   153    >   FETCH_THIS                                       $72     
        154        FETCH_OBJ_R                                      ~73     $72, 'sResponse'
        155      > RETURN                                                   ~73
        156*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.6 ms | 1412 KiB | 21 Q