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); 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 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5nYlW
function name:  (null)
number of ops:  21
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        ASSIGN                                                   !2, 0
          9      > JMP                                                      ->18
    9    10    >   FETCH_OBJ_R                                      ~9      !1, 'forecast'
         11        FETCH_OBJ_R                                      ~10     ~9, 'txt_forecast'
         12        FETCH_OBJ_R                                      ~11     ~10, 'forecastday'
         13        FETCH_OBJ_R                                      ~12     ~11, !2
         14        ASSIGN                                                   !3, ~12
   11    15        FETCH_OBJ_R                                      ~14     !3, 'title'
         16      > RETURN                                                   ~14
    7    17*       PRE_INC                                                  !2
         18    >   IS_SMALLER_OR_EQUAL                                      !2, 1
         19      > JMPNZ                                                    ~16, ->10
   13    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.15 ms | 1386 KiB | 17 Q