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=' . $myAddress ); 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/8k71n
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/8k71n
function name:  GetJsonFeed
number of ops:  26
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%3D'
          6        CONCAT                                           ~7      ~6, !0
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        END_SILENCE                                              ~4
         10        ASSIGN                                                   !2, $8
   10    11        CONCAT                                           ~10     !2, '%3Cbr%3E'
         12        ECHO                                                     ~10
   11    13        INIT_FCALL                                               'file_get_contents'
         14        INIT_FCALL                                               'rawurlencode'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $11     
         17        SEND_VAR                                                 $11
         18        SEND_VAL                                                 'r'
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !3, $12
   12    21        INIT_FCALL                                               'json_decode'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $14     
         24      > RETURN                                                   $14
   13    25*     > RETURN                                                   null

End of function getjsonfeed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.93 ms | 1403 KiB | 22 Q