3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = file_get_contents('http://api.geonames.org/findNearbyPlaceNameJSON?lat=51.9877644&lng=-1.47866&username=demo'); $data = json_decode($json,true); $Geonames = $data['geonames'][0]; echo "<pre>"; print_r($Geonames); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/8YBmu
function name:  (null)
number of ops:  18
compiled vars:  !0 = $json, !1 = $data, !2 = $Geonames
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'http%3A%2F%2Fapi.geonames.org%2FfindNearbyPlaceNameJSON%3Flat%3D51.9877644%26lng%3D-1.47866%26username%3Ddemo'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    7     9        FETCH_DIM_R                                      ~7      !1, 'geonames'
         10        FETCH_DIM_R                                      ~8      ~7, 0
         11        ASSIGN                                                   !2, ~8
    9    12        ECHO                                                     '%3Cpre%3E'
   11    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
   13    16      > EXIT                                                     
         17*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.56 ms | 1394 KiB | 19 Q