3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getLnt($zip){ $url = "http://maps.googleapis.com/maps/api/geocode/json?address= ".urlencode($zip)."&sensor=false"; $result_string = file_get_contents($url); $result = json_decode($result_string, true); return $result['results'][0]['geometry']['location']; } $val = getLnt('75204'); echo "Latitude: ".$val['lat']."<br>"; echo "Longitude: ".$val['lng']."<br>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQKKq
function name:  (null)
number of ops:  13
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'getlnt'
          1        SEND_VAL                                                 '75204'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   10     4        FETCH_DIM_R                                      ~3      !0, 'lat'
          5        CONCAT                                           ~4      'Latitude%3A+', ~3
          6        CONCAT                                           ~5      ~4, '%3Cbr%3E'
          7        ECHO                                                     ~5
   11     8        FETCH_DIM_R                                      ~6      !0, 'lng'
          9        CONCAT                                           ~7      'Longitude%3A+', ~6
         10        CONCAT                                           ~8      ~7, '%3Cbr%3E'
         11        ECHO                                                     ~8
   12    12      > RETURN                                                   1

Function getlnt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQKKq
function name:  getLnt
number of ops:  22
compiled vars:  !0 = $zip, !1 = $url, !2 = $result_string, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'urlencode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        CONCAT                                           ~5      'http%3A%2F%2Fmaps.googleapis.com%2Fmaps%2Fapi%2Fgeocode%2Fjson%3Faddress%3D%0A%09', $4
          5        CONCAT                                           ~6      ~5, '%26sensor%3Dfalse'
    3     6        ASSIGN                                                   !1, ~6
    5     7        INIT_FCALL                                               'file_get_contents'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    6    11        INIT_FCALL                                               'json_decode'
         12        SEND_VAR                                                 !2
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !3, $10
    7    16        FETCH_DIM_R                                      ~12     !3, 'results'
         17        FETCH_DIM_R                                      ~13     ~12, 0
         18        FETCH_DIM_R                                      ~14     ~13, 'geometry'
         19        FETCH_DIM_R                                      ~15     ~14, 'location'
         20      > RETURN                                                   ~15
    8    21*     > RETURN                                                   null

End of function getlnt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.87 ms | 1399 KiB | 20 Q