3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json_string = file_get_contents("http://api.wunderground.com/api/a4ae759739c92427/forecast/q/UK/Newcastle.json"); $parsed_json = json_decode($json_string); var_dump($json_string); for($i = 0; $i <= 1; $i++) { $day = $parsed_json->forecast->txt_forecast->forecastday->{$i}; return $day->title; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 13
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEirX
function name:  (null)
number of ops:  24
compiled vars:  !0 = $json_string, !1 = $parsed_json, !2 = $i, !3 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'http%3A%2F%2Fapi.wunderground.com%2Fapi%2Fa4ae759739c92427%2Fforecast%2Fq%2FUK%2FNewcastle.json'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    7     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    9    11        ASSIGN                                                   !2, 0
         12      > JMP                                                      ->21
   11    13    >   FETCH_OBJ_R                                      ~10     !1, 'forecast'
         14        FETCH_OBJ_R                                      ~11     ~10, 'txt_forecast'
         15        FETCH_OBJ_R                                      ~12     ~11, 'forecastday'
         16        FETCH_OBJ_R                                      ~13     ~12, !2
         17        ASSIGN                                                   !3, ~13
   13    18        FETCH_OBJ_R                                      ~15     !3, 'title'
         19      > RETURN                                                   ~15
    9    20*       PRE_INC                                                  !2
         21    >   IS_SMALLER_OR_EQUAL                                      !2, 1
         22      > JMPNZ                                                    ~17, ->13
   15    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.38 ms | 1395 KiB | 19 Q