3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://api.chefkoch.de/api/1.2/api-recipe.php?ID=640221164979273'; $content = file_get_contents($url); $json = json_decode($content, true); foreach($json['data']['weather'] as $item) { print $item['date']; print ' - '; print $item['weatherDesc'][0]['value']; print ' - '; print '<img src="' . $item['weatherIconUrl'][0]['value'] . '" border="0" alt="" />'; print '<br>'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 30
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 30
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/KYP0u
function name:  (null)
number of ops:  32
compiled vars:  !0 = $url, !1 = $content, !2 = $json, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapi.chefkoch.de%2Fapi%2F1.2%2Fapi-recipe.php%3FID%3D640221164979273'
    4     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        FETCH_DIM_R                                      ~9      !2, 'data'
         11        FETCH_DIM_R                                      ~10     ~9, 'weather'
         12      > FE_RESET_R                                       $11     ~10, ->30
         13    > > FE_FETCH_R                                               $11, !3, ->30
    8    14    >   FETCH_DIM_R                                      ~12     !3, 'date'
         15        ECHO                                                     ~12
    9    16        ECHO                                                     '+-+'
   10    17        FETCH_DIM_R                                      ~13     !3, 'weatherDesc'
         18        FETCH_DIM_R                                      ~14     ~13, 0
         19        FETCH_DIM_R                                      ~15     ~14, 'value'
         20        ECHO                                                     ~15
   11    21        ECHO                                                     '+-+'
   12    22        FETCH_DIM_R                                      ~16     !3, 'weatherIconUrl'
         23        FETCH_DIM_R                                      ~17     ~16, 0
         24        FETCH_DIM_R                                      ~18     ~17, 'value'
         25        CONCAT                                           ~19     '%3Cimg+src%3D%22', ~18
         26        CONCAT                                           ~20     ~19, '%22+border%3D%220%22+alt%3D%22%22+%2F%3E'
         27        ECHO                                                     ~20
   13    28        ECHO                                                     '%3Cbr%3E'
    7    29      > JMP                                                      ->13
         30    >   FE_FREE                                                  $11
   14    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.93 ms | 1396 KiB | 17 Q