3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://maps.google.com/maps/api/geocode/json?address=Bahnhofstra%C3%9Fe+19+Gr%C3%A4fenhainichen&components=country:NL'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $data = curl_exec($ch); // $data = json_decode($data); var_dump($data); if (!curl_errno($ch) && isset($data->status) && ($data->status == 'OK')) { // $latitude = $data->result[0]->geometry->location->lat; // $longitude = $data->result[0]->geometry->location->lng; // if ($dealers = User::findDealersByCoordinates($longitude, $latitude, $country->id)) { // $dealerId = $dealers[0]['dealerID']; // $websiteId = $dealers[0]['websiteID']; // } } else { // Yii::error('Curl request at Google API timeout'); } curl_close($ch);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 46) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 35
Branch analysis from position: 31
filename:       /in/uF9Hq
function name:  (null)
number of ops:  41
compiled vars:  !0 = $url, !1 = $ch, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fmaps.google.com%2Fmaps%2Fapi%2Fgeocode%2Fjson%3Faddress%3DBahnhofstra%25C3%259Fe%2B19%2BGr%25C3%25A4fenhainichen%26components%3Dcountry%3ANL'
    5     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !1
          7        FETCH_CONSTANT                                   ~6      'CURLOPT_RETURNTRANSFER'
          8        SEND_VAL_EX                                              ~6
          9        SEND_VAL_EX                                              1
         10        DO_FCALL                                      0          
    7    11        INIT_FCALL_BY_NAME                                       'curl_setopt'
         12        SEND_VAR_EX                                              !1
         13        FETCH_CONSTANT                                   ~8      'CURLOPT_TIMEOUT'
         14        SEND_VAL_EX                                              ~8
         15        SEND_VAL_EX                                              5
         16        DO_FCALL                                      0          
    9    17        INIT_FCALL_BY_NAME                                       'curl_exec'
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0  $10     
         20        ASSIGN                                                   !2, $10
   11    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
   13    24        INIT_FCALL_BY_NAME                                       'curl_errno'
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $13     
         27        BOOL_NOT                                         ~14     $13
         28      > JMPZ_EX                                          ~14     ~14, ->31
         29    >   ISSET_ISEMPTY_PROP_OBJ                           ~15     !2, 'status'
         30        BOOL                                             ~14     ~15
         31    > > JMPZ_EX                                          ~14     ~14, ->35
         32    >   FETCH_OBJ_R                                      ~16     !2, 'status'
         33        IS_EQUAL                                         ~17     ~16, 'OK'
         34        BOOL                                             ~14     ~17
         35    > > JMPZ                                                     ~14, ->37
         36    > > JMP                                                      ->37
   25    37    >   INIT_FCALL_BY_NAME                                       'curl_close'
         38        SEND_VAR_EX                                              !1
         39        DO_FCALL                                      0          
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.14 ms | 1400 KiB | 15 Q