3v4l.org

run code in 300+ PHP versions simultaneously
<?php $service_url = 'http://api3.wordtracker.com/search'; $curl = curl_init($service_url); $curl_post_data = array( 'app_id' => '09d67621', 'app_key' => 'c0ab83a5057b00d294a2b7531ce21236', 'keyword' => 'cheap holidays', 'limit' => '3' ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); if ($curl_response === false) { $info = curl_getinfo($curl); curl_close($curl); die('error occured during curl exec. Additioanl info: ' . var_export($info)); } curl_close($curl); $decoded = json_decode($curl_response); if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') { die('error occured: ' . $decoded->response->errormessage); } echo 'response ok!'; var_export($decoded->response); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 42
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 42
2 jumps found. (Code = 46) Position 1 = 52, Position 2 = 56
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 61
Branch analysis from position: 57
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
filename:       /in/vaM3d
function name:  (null)
number of ops:  67
compiled vars:  !0 = $service_url, !1 = $curl, !2 = $curl_post_data, !3 = $curl_response, !4 = $info, !5 = $decoded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapi3.wordtracker.com%2Fsearch'
    3     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !1, $7
    4     5        ASSIGN                                                   !2, <array>
   10     6        INIT_FCALL_BY_NAME                                       'curl_setopt'
          7        SEND_VAR_EX                                              !1
          8        FETCH_CONSTANT                                   ~10     'CURLOPT_RETURNTRANSFER'
          9        SEND_VAL_EX                                              ~10
         10        SEND_VAL_EX                                              <true>
         11        DO_FCALL                                      0          
   11    12        INIT_FCALL_BY_NAME                                       'curl_setopt'
         13        SEND_VAR_EX                                              !1
         14        FETCH_CONSTANT                                   ~12     'CURLOPT_POST'
         15        SEND_VAL_EX                                              ~12
         16        SEND_VAL_EX                                              <true>
         17        DO_FCALL                                      0          
   12    18        INIT_FCALL_BY_NAME                                       'curl_setopt'
         19        SEND_VAR_EX                                              !1
         20        FETCH_CONSTANT                                   ~14     'CURLOPT_POSTFIELDS'
         21        SEND_VAL_EX                                              ~14
         22        SEND_VAR_EX                                              !2
         23        DO_FCALL                                      0          
   13    24        INIT_FCALL_BY_NAME                                       'curl_exec'
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $16     
         27        ASSIGN                                                   !3, $16
   14    28        TYPE_CHECK                                    4          !3
         29      > JMPZ                                                     ~18, ->42
   15    30    >   INIT_FCALL_BY_NAME                                       'curl_getinfo'
         31        SEND_VAR_EX                                              !1
         32        DO_FCALL                                      0  $19     
         33        ASSIGN                                                   !4, $19
   16    34        INIT_FCALL_BY_NAME                                       'curl_close'
         35        SEND_VAR_EX                                              !1
         36        DO_FCALL                                      0          
   17    37        INIT_FCALL                                               'var_export'
         38        SEND_VAR                                                 !4
         39        DO_ICALL                                         $22     
         40        CONCAT                                           ~23     'error+occured+during+curl+exec.+Additioanl+info%3A+', $22
         41      > EXIT                                                     ~23
   19    42    >   INIT_FCALL_BY_NAME                                       'curl_close'
         43        SEND_VAR_EX                                              !1
         44        DO_FCALL                                      0          
   20    45        INIT_FCALL                                               'json_decode'
         46        SEND_VAR                                                 !3
         47        DO_ICALL                                         $25     
         48        ASSIGN                                                   !5, $25
   21    49        FETCH_OBJ_IS                                     ~27     !5, 'response'
         50        ISSET_ISEMPTY_PROP_OBJ                           ~28     ~27, 'status'
         51      > JMPZ_EX                                          ~28     ~28, ->56
         52    >   FETCH_OBJ_R                                      ~29     !5, 'response'
         53        FETCH_OBJ_R                                      ~30     ~29, 'status'
         54        IS_EQUAL                                         ~31     ~30, 'ERROR'
         55        BOOL                                             ~28     ~31
         56    > > JMPZ                                                     ~28, ->61
   22    57    >   FETCH_OBJ_R                                      ~32     !5, 'response'
         58        FETCH_OBJ_R                                      ~33     ~32, 'errormessage'
         59        CONCAT                                           ~34     'error+occured%3A+', ~33
         60      > EXIT                                                     ~34
   24    61    >   ECHO                                                     'response+ok%21'
   25    62        INIT_FCALL                                               'var_export'
         63        FETCH_OBJ_R                                      ~35     !5, 'response'
         64        SEND_VAL                                                 ~35
         65        DO_ICALL                                                 
   26    66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.09 ms | 1400 KiB | 17 Q