3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = $_GET['url']; header('Content-Type: application/json'); $JSON = file_get_contents($url); // echo the JSON (you can echo this to JavaScript to use it there) echo json_encode($JSON); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vCH8c
function name:  (null)
number of ops:  15
compiled vars:  !0 = $url, !1 = $JSON
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_R                      global              ~2      '_GET'
          1        FETCH_DIM_R                                      ~3      ~2, 'url'
          2        ASSIGN                                                   !0, ~3
    3     3        INIT_FCALL                                               'header'
          4        SEND_VAL                                                 'Content-Type%3A+application%2Fjson'
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'file_get_contents'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
    7    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ECHO                                                     $8
    8    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.91 ms | 1394 KiB | 19 Q