3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{ "ip": "8.8.8.8", "hostname": "google-public-dns-a.google.com", "city": "Mountain View", "region": "California", "country": "US", "loc": "37.3860,-122.0838", "org": "AS15169 Google Inc.", "postal": "94040" }'; $json = json_decode($str, true); echo $country = $json['country'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XaU1l
function name:  (null)
number of ops:  10
compiled vars:  !0 = $str, !1 = $json, !2 = $country
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++%22ip%22%3A+%228.8.8.8%22%2C%0A++%22hostname%22%3A+%22google-public-dns-a.google.com%22%2C%0A++%22city%22%3A+%22Mountain+View%22%2C%0A++%22region%22%3A+%22California%22%2C%0A++%22country%22%3A+%22US%22%2C%0A++%22loc%22%3A+%2237.3860%2C-122.0838%22%2C%0A++%22org%22%3A+%22AS15169+Google+Inc.%22%2C%0A++%22postal%22%3A+%2294040%22%0A%7D'
   14     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   15     6        FETCH_DIM_R                                      ~6      !1, 'country'
          7        ASSIGN                                           ~7      !2, ~6
          8        ECHO                                                     ~7
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.88 ms | 996 KiB | 14 Q