3v4l.org

run code in 300+ PHP versions simultaneously
<?php { //need the js code here... $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'} . "<br>" . $day->{'fcttext_metric'} . "<br><br>"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r0cXL
function name:  (null)
number of ops:  26
compiled vars:  !0 = $json_string, !1 = $parsed_json, !2 = $i, !3 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     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
    8     4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
   10     8        ASSIGN                                                   !2, 0
          9      > JMP                                                      ->23
   12    10    >   FETCH_CONSTANT                                   ~12     'i'
         11        FETCH_OBJ_R                                      ~9      !1, 'forecast'
         12        FETCH_OBJ_R                                      ~10     ~9, 'txt_forecast'
         13        FETCH_OBJ_R                                      ~11     ~10, 'forecastday'
         14        FETCH_OBJ_R                                      ~13     ~11, ~12
         15        ASSIGN                                                   !3, ~13
   14    16        FETCH_OBJ_R                                      ~15     !3, 'title'
         17        CONCAT                                           ~16     ~15, '%3Cbr%3E'
         18        FETCH_OBJ_R                                      ~17     !3, 'fcttext_metric'
         19        CONCAT                                           ~18     ~16, ~17
         20        CONCAT                                           ~19     ~18, '%3Cbr%3E%3Cbr%3E'
         21      > RETURN                                                   ~19
   10    22*       PRE_INC                                                  !2
         23    >   IS_SMALLER_OR_EQUAL                                      !2, 1
         24      > JMPNZ                                                    ~21, ->10
   18    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.65 ms | 1395 KiB | 17 Q