3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myAddress = "15502 S Memorial Dr, Bixby, OK 74445"; $myKey = "Fmjtd%7Cluu82q6y2q%2Can%3Do5-94txl0"; function GetJsonFeed() { global $myAddress, $myKey; //$url = "http://www.mapquestapi.com/geocoding/v1/address?key=" . $myKey . "&callback=renderOptions&inFormat=kvp&outFormat=json&location=" . $myAddress . "&maxResults=1"; $url = @file_get_contents('http://open.mapquestapi.com/geocoding/v1/address?key=' . $myKey . '&location=Lancaster,PA'); //echo $url . "<br>"; $mapresponse = file_get_contents(rawurlencode($url), "r"); return json_decode($mapresponse); } $json = GetJsonFeed(); $jsonArr = json_decode($json); var_dump(json_decode($json, true)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sQThU
function name:  (null)
number of ops:  17
compiled vars:  !0 = $myAddress, !1 = $myKey, !2 = $json, !3 = $jsonArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '15502+S+Memorial+Dr%2C+Bixby%2C+OK+74445'
    4     1        ASSIGN                                                   !1, 'Fmjtd%257Cluu82q6y2q%252Can%253Do5-94txl0'
   15     2        INIT_FCALL                                               'getjsonfeed'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !2, $6
   16     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
   17     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'json_decode'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                                 
   18    16      > RETURN                                                   1

Function getjsonfeed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sQThU
function name:  GetJsonFeed
number of ops:  23
compiled vars:  !0 = $myAddress, !1 = $myKey, !2 = $url, !3 = $mapresponse
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_GLOBAL                                              !0, 'myAddress'
          1        BIND_GLOBAL                                              !1, 'myKey'
    9     2        BEGIN_SILENCE                                    ~4      
          3        INIT_FCALL                                               'file_get_contents'
          4        CONCAT                                           ~5      'http%3A%2F%2Fopen.mapquestapi.com%2Fgeocoding%2Fv1%2Faddress%3Fkey%3D', !1
          5        CONCAT                                           ~6      ~5, '%26location%3DLancaster%2CPA'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                         $7      
          8        END_SILENCE                                              ~4
          9        ASSIGN                                                   !2, $7
   11    10        INIT_FCALL                                               'file_get_contents'
         11        INIT_FCALL                                               'rawurlencode'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        SEND_VAL                                                 'r'
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
   12    18        INIT_FCALL                                               'json_decode'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $12     
         21      > RETURN                                                   $12
   13    22*     > RETURN                                                   null

End of function getjsonfeed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.12 ms | 1403 KiB | 22 Q