3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $url = "http://openexchangerates.org/api/latest.json?app_id=d4c39d762a1f47ee8917d7b5d380365c&base=EUR&symbols=USD"; $rawData = file_get_contents($url); if (!$rawData) echo "null<br>"; $response = json_decode($rawData, true); if (!isset($response["rates"])) echo "nullnull<br>"; var_dump($response);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/PSJFh
function name:  (null)
number of ops:  21
compiled vars:  !0 = $url, !1 = $rawData, !2 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fopenexchangerates.org%2Fapi%2Flatest.json%3Fapp_id%3Dd4c39d762a1f47ee8917d7b5d380365c%26base%3DEUR%26symbols%3DUSD'
    4     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        BOOL_NOT                                         ~6      !1
          6      > JMPZ                                                     ~6, ->8
    7     7    >   ECHO                                                     'null%3Cbr%3E'
    9     8    >   INIT_FCALL                                               'json_decode'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
   11    13        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      !2, 'rates'
         14        BOOL_NOT                                         ~10     ~9
         15      > JMPZ                                                     ~10, ->17
   12    16    >   ECHO                                                     'nullnull%3Cbr%3E'
   14    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.53 ms | 1386 KiB | 19 Q