3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userGuid = "ee034881-d641-48e9-935d-b79819ceb83c"; $apiKey = "1XzbK/S/MAzPtkwRtmoUM0CnLWveqIMAkXZGhokuzg5P87lT+cedfeOAqXbgkjGip1X6qnY1mbQdW3DdajUhUw=="; function query($connectorGuid, $input, $userGuid, $apiKey, $additionalInput) { $url = "https://api.import.io/store/connector/" . $connectorGuid . "/_query?_user=" . urlencode($userGuid) . "&_apikey=" . urlencode($apiKey); $data = array("input" => $input); if ($additionalInput) { $data["additionalInput"] = $additionalInput; } $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); $result = curl_exec($ch); curl_close($ch); return json_decode($result); } // Query for tile Betezy Promos $result = query("a31b0662-07ca-44f1-b1ab-76a39d2014d9", array( "webpage/url" => "http://blog.betezy.com.au/category/promotions/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Betstar Promos $result = query("b0f3c82d-4983-474b-b911-34bb84cc7569", array( "webpage/url" => "https://www.betstar.com.au/promotions/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Bookmaker Promos $result = query("09a2bab1-9615-4281-924f-2e83d88f1a3f", array( "webpage/url" => "https://www.bookmaker.com.au/promotions/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Betfred Promos $result = query("7b3a36f8-70ef-400c-a6ee-ec84e660adf3", array( "webpage/url" => "https://m.betfred.com.au/promotions/sports", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Centrebet Promos $result = query("bc6a4943-61a7-4b94-947e-7fe6751507d2", array( "webpage/url" => "http://centrebet.com/promotions", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Iasbet Promos $result = query("2721151f-db07-49b6-83bf-f88ca2c1371e", array( "webpage/url" => "http://www.iasbet.com/content/page/latest-promotions-overview/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile ladbrokes promos $result = query("f6833c85-4a92-47b1-9b96-4c287eac5d24", array( "webpage/url" => "https://www.ladbrokes.com.au/promotions/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Luxbet Promos $result = query("2537c316-c0e7-4ad2-a671-01a2097e195d", array( "webpage/url" => "https://www.luxbet.com/staticcontent/promotions", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Sportingbet Promos $result = query("3971816e-e240-414f-9689-2143028af925", array( "webpage/url" => "https://info.sportingbet.com.au/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Tom WH Promos $result = query("e9cb74ff-3a8c-4be1-a23f-8797da1845e7", array( "webpage/url" => "http://info.tomwaterhouse.com/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile SportsBet Promos $result = query("5967d9a8-456c-4f79-ab83-e27781408eef", array( "webpage/url" => "http://www.sportsbet.com.au/content/page/offers/", ), $userGuid, $apiKey, false); var_dump($result); // Query for tile Unibet Promos $result = query("1ce3343a-9b7b-458f-b2a5-580a324e1dcc", array( "webpage/url" => "https://www.unibet.com.au/promotions", ), $userGuid, $apiKey, false); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ab0mu
function name:  (null)
number of ops:  135
compiled vars:  !0 = $userGuid, !1 = $apiKey, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ee034881-d641-48e9-935d-b79819ceb83c'
    4     1        ASSIGN                                                   !1, '1XzbK%2FS%2FMAzPtkwRtmoUM0CnLWveqIMAkXZGhokuzg5P87lT%2BcedfeOAqXbgkjGip1X6qnY1mbQdW3DdajUhUw%3D%3D'
   28     2        INIT_FCALL                                               'query'
          3        SEND_VAL                                                 'a31b0662-07ca-44f1-b1ab-76a39d2014d9'
   29     4        SEND_VAL                                                 <array>
   30     5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <false>
          8        DO_FCALL                                      0  $5      
   28     9        ASSIGN                                                   !2, $5
   31    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   34    13        INIT_FCALL                                               'query'
         14        SEND_VAL                                                 'b0f3c82d-4983-474b-b911-34bb84cc7569'
   35    15        SEND_VAL                                                 <array>
   36    16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 <false>
         19        DO_FCALL                                      0  $8      
   34    20        ASSIGN                                                   !2, $8
   37    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
   40    24        INIT_FCALL                                               'query'
         25        SEND_VAL                                                 '09a2bab1-9615-4281-924f-2e83d88f1a3f'
   41    26        SEND_VAL                                                 <array>
   42    27        SEND_VAR                                                 !0
         28        SEND_VAR                                                 !1
         29        SEND_VAL                                                 <false>
         30        DO_FCALL                                      0  $11     
   40    31        ASSIGN                                                   !2, $11
   43    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                                 
   46    35        INIT_FCALL                                               'query'
         36        SEND_VAL                                                 '7b3a36f8-70ef-400c-a6ee-ec84e660adf3'
   47    37        SEND_VAL                                                 <array>
   48    38        SEND_VAR                                                 !0
         39        SEND_VAR                                                 !1
         40        SEND_VAL                                                 <false>
         41        DO_FCALL                                      0  $14     
   46    42        ASSIGN                                                   !2, $14
   49    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !2
         45        DO_ICALL                                                 
   52    46        INIT_FCALL                                               'query'
         47        SEND_VAL                                                 'bc6a4943-61a7-4b94-947e-7fe6751507d2'
   53    48        SEND_VAL                                                 <array>
   54    49        SEND_VAR                                                 !0
         50        SEND_VAR                                                 !1
         51        SEND_VAL                                                 <false>
         52        DO_FCALL                                      0  $17     
   52    53        ASSIGN                                                   !2, $17
   55    54        INIT_FCALL                                               'var_dump'
         55        SEND_VAR                                                 !2
         56        DO_ICALL                                                 
   58    57        INIT_FCALL                                               'query'
         58        SEND_VAL                                                 '2721151f-db07-49b6-83bf-f88ca2c1371e'
   59    59        SEND_VAL                                                 <array>
   60    60        SEND_VAR                                                 !0
         61        SEND_VAR                                                 !1
         62        SEND_VAL                                                 <false>
         63        DO_FCALL                                      0  $20     
   58    64        ASSIGN                                                   !2, $20
   61    65        INIT_FCALL                                               'var_dump'
         66        SEND_VAR                                                 !2
         67        DO_ICALL                                                 
   64    68        INIT_FCALL                                               'query'
         69        SEND_VAL                                                 'f6833c85-4a92-47b1-9b96-4c287eac5d24'
   65    70        SEND_VAL                                                 <array>
   66    71        SEND_VAR                                                 !0
         72        SEND_VAR                                                 !1
         73        SEND_VAL                                                 <false>
         74        DO_FCALL                                      0  $23     
   64    75        ASSIGN                                                   !2, $23
   67    76        INIT_FCALL                                               'var_dump'
         77        SEND_VAR                                                 !2
         78        DO_ICALL                                                 
   70    79        INIT_FCALL                                               'query'
         80        SEND_VAL                                                 '2537c316-c0e7-4ad2-a671-01a2097e195d'
   71    81        SEND_VAL                                                 <array>
   72    82        SEND_VAR                                                 !0
         83        SEND_VAR                                                 !1
         84        SEND_VAL                                                 <false>
         85        DO_FCALL                                      0  $26     
   70    86        ASSIGN                                                   !2, $26
   73    87        INIT_FCALL                                               'var_dump'
         88        SEND_VAR                                                 !2
         89        DO_ICALL                                                 
   76    90        INIT_FCALL                                               'query'
         91        SEND_VAL                                                 '3971816e-e240-414f-9689-2143028af925'
   77    92        SEND_VAL                                                 <array>
   78    93        SEND_VAR                                                 !0
         94        SEND_VAR                                                 !1
         95        SEND_VAL                                                 <false>
         96        DO_FCALL                                      0  $29     
   76    97        ASSIGN                                                   !2, $29
   79    98        INIT_FCALL                                               'var_dump'
         99        SEND_VAR                                                 !2
        100        DO_ICALL                                                 
   82   101        INIT_FCALL                                               'query'
        102        SEND_VAL                                                 'e9cb74ff-3a8c-4be1-a23f-8797da1845e7'
   83   103        SEND_VAL                                                 <array>
   84   104        SEND_VAR                                                 !0
        105        SEND_VAR                                                 !1
        106        SEND_VAL                                                 <false>
        107        DO_FCALL                                      0  $32     
   82   108        ASSIGN                                                   !2, $32
   85   109        INIT_FCALL                                               'var_dump'
        110        SEND_VAR                                                 !2
        111        DO_ICALL                                                 
   88   112        INIT_FCALL                                               'query'
        113        SEND_VAL                                                 '5967d9a8-456c-4f79-ab83-e27781408eef'
   89   114        SEND_VAL                                                 <array>
   90   115        SEND_VAR                                                 !0
        116        SEND_VAR                                                 !1
        117        SEND_VAL                                                 <false>
        118        DO_FCALL                                      0  $35     
   88   119        ASSIGN                                                   !2, $35
   91   120        INIT_FCALL                                               'var_dump'
        121        SEND_VAR                                                 !2
        122        DO_ICALL                                                 
   94   123        INIT_FCALL                                               'query'
        124        SEND_VAL                                                 '1ce3343a-9b7b-458f-b2a5-580a324e1dcc'
   95   125        SEND_VAL                                                 <array>
   96   126        SEND_VAR                                                 !0
        127        SEND_VAR                                                 !1
        128        SEND_VAL                                                 <false>
        129        DO_FCALL                                      0  $38     
   94   130        ASSIGN                                                   !2, $38
   97   131        INIT_FCALL                                               'var_dump'
        132        SEND_VAR                                                 !2
        133        DO_ICALL                                                 
        134      > RETURN                                                   1

Function query:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/ab0mu
function name:  query
number of ops:  71
compiled vars:  !0 = $connectorGuid, !1 = $input, !2 = $userGuid, !3 = $apiKey, !4 = $additionalInput, !5 = $url, !6 = $data, !7 = $ch, !8 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
    8     5        CONCAT                                           ~9      'https%3A%2F%2Fapi.import.io%2Fstore%2Fconnector%2F', !0
          6        CONCAT                                           ~10     ~9, '%2F_query%3F_user%3D'
          7        INIT_FCALL                                               'urlencode'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $11     
         10        CONCAT                                           ~12     ~10, $11
         11        CONCAT                                           ~13     ~12, '%26_apikey%3D'
         12        INIT_FCALL                                               'urlencode'
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                         $14     
         15        CONCAT                                           ~15     ~13, $14
         16        ASSIGN                                                   !5, ~15
   10    17        INIT_ARRAY                                       ~17     !1, 'input'
         18        ASSIGN                                                   !6, ~17
   11    19      > JMPZ                                                     !4, ->22
   12    20    >   ASSIGN_DIM                                               !6, 'additionalInput'
         21        OP_DATA                                                  !4
   15    22    >   INIT_FCALL_BY_NAME                                       'curl_init'
         23        SEND_VAR_EX                                              !5
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !7, $20
   16    26        INIT_FCALL_BY_NAME                                       'curl_setopt'
         27        SEND_VAR_EX                                              !7
         28        FETCH_CONSTANT                                   ~22     'CURLOPT_HTTPHEADER'
         29        SEND_VAL_EX                                              ~22
         30        SEND_VAL_EX                                              <array>
         31        DO_FCALL                                      0          
   17    32        INIT_FCALL_BY_NAME                                       'curl_setopt'
         33        SEND_VAR_EX                                              !7
         34        FETCH_CONSTANT                                   ~24     'CURLOPT_POSTFIELDS'
         35        SEND_VAL_EX                                              ~24
         36        INIT_FCALL                                               'json_encode'
         37        SEND_VAR                                                 !6
         38        DO_ICALL                                         $25     
         39        SEND_VAR_NO_REF_EX                                       $25
         40        DO_FCALL                                      0          
   18    41        INIT_FCALL_BY_NAME                                       'curl_setopt'
         42        SEND_VAR_EX                                              !7
         43        FETCH_CONSTANT                                   ~27     'CURLOPT_POST'
         44        SEND_VAL_EX                                              ~27
         45        SEND_VAL_EX                                              1
         46        DO_FCALL                                      0          
   19    47        INIT_FCALL_BY_NAME                                       'curl_setopt'
         48        SEND_VAR_EX                                              !7
         49        FETCH_CONSTANT                                   ~29     'CURLOPT_RETURNTRANSFER'
         50        SEND_VAL_EX                                              ~29
         51        SEND_VAL_EX                                              1
         52        DO_FCALL                                      0          
   20    53        INIT_FCALL_BY_NAME                                       'curl_setopt'
         54        SEND_VAR_EX                                              !7
         55        FETCH_CONSTANT                                   ~31     'CURLOPT_HEADER'
         56        SEND_VAL_EX                                              ~31
         57        SEND_VAL_EX                                              0
         58        DO_FCALL                                      0          
   21    59        INIT_FCALL_BY_NAME                                       'curl_exec'
         60        SEND_VAR_EX                                              !7
         61        DO_FCALL                                      0  $33     
         62        ASSIGN                                                   !8, $33
   22    63        INIT_FCALL_BY_NAME                                       'curl_close'
         64        SEND_VAR_EX                                              !7
         65        DO_FCALL                                      0          
   24    66        INIT_FCALL                                               'json_decode'
         67        SEND_VAR                                                 !8
         68        DO_ICALL                                         $36     
         69      > RETURN                                                   $36
   25    70*     > RETURN                                                   null

End of function query

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.52 ms | 1426 KiB | 33 Q