3v4l.org

run code in 300+ PHP versions simultaneously
<?php $api_url = "http://api.wunderground.com/api/a4ae759739c92427/forecast/q/UK/Newcastle.json"; //need the js code here.. $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $json_string = curl_exec($ch); curl_close($ch); 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 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 23
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bdOSC
function name:  (null)
number of ops:  34
compiled vars:  !0 = $api_url, !1 = $ch, !2 = $json_string, !3 = $i, !4 = $day, !5 = $parsed_json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapi.wunderground.com%2Fapi%2Fa4ae759739c92427%2Fforecast%2Fq%2FUK%2FNewcastle.json'
    6     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !1, $7
    7     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !1
          7        FETCH_CONSTANT                                   ~9      'CURLOPT_RETURNTRANSFER'
          8        SEND_VAL_EX                                              ~9
          9        SEND_VAL_EX                                              <true>
         10        DO_FCALL                                      0          
    8    11        INIT_FCALL_BY_NAME                                       'curl_exec'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $11     
         14        ASSIGN                                                   !2, $11
    9    15        INIT_FCALL_BY_NAME                                       'curl_close'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
   11    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   13    21        ASSIGN                                                   !3, 0
         22      > JMP                                                      ->31
   15    23    >   FETCH_OBJ_R                                      ~16     !5, 'forecast'
         24        FETCH_OBJ_R                                      ~17     ~16, 'txt_forecast'
         25        FETCH_OBJ_R                                      ~18     ~17, 'forecastday'
         26        FETCH_OBJ_R                                      ~19     ~18, !3
         27        ASSIGN                                                   !4, ~19
   17    28        FETCH_OBJ_R                                      ~21     !4, 'title'
         29      > RETURN                                                   ~21
   13    30*       PRE_INC                                                  !3
         31    >   IS_SMALLER_OR_EQUAL                                      !3, 1
         32      > JMPNZ                                                    ~23, ->23
   19    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.6 ms | 1396 KiB | 15 Q