3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userip = $_SERVER['REMOTE_ADDR']; $urlco = 'http://freegeoip.net/json/'.$userip.''; $contentco = file_get_contents($urlco); $jsonco = json_decode($contentco, true); echo "<center><p style='color:white; text-shadow:1px 1px 3px black; font-size:20px;'>Country is"; $jsonco['country_code']; echo "</p></center>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KqIco
function name:  (null)
number of ops:  20
compiled vars:  !0 = $userip, !1 = $urlco, !2 = $contentco, !3 = $jsonco
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_R                      global              ~4      '_SERVER'
          1        FETCH_DIM_R                                      ~5      ~4, 'REMOTE_ADDR'
          2        ASSIGN                                                   !0, ~5
    3     3        CONCAT                                           ~7      'http%3A%2F%2Ffreegeoip.net%2Fjson%2F', !0
          4        CONCAT                                           ~8      ~7, ''
          5        ASSIGN                                                   !1, ~8
    4     6        INIT_FCALL                                               'file_get_contents'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !2, $10
    5    10        INIT_FCALL                                               'json_decode'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
    6    15        ECHO                                                     '%3Ccenter%3E%3Cp+style%3D%27color%3Awhite%3B+text-shadow%3A1px+1px+3px+black%3B+font-size%3A20px%3B%27%3ECountry+is'
    7    16        FETCH_DIM_R                                      ~14     !3, 'country_code'
         17        FREE                                                     ~14
    8    18        ECHO                                                     '%3C%2Fp%3E%3C%2Fcenter%3E'
    9    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.5 ms | 1395 KiB | 17 Q