3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode(file_get_contents('http://ok.ru/dk?cmd=videoPlayerMetadata&mid=28339342042'), true); $return = array(); foreach($data['videos'] as $videos){ $filename = $videos['name']; $url = $videos['url']; $type = 'mp4'; $return[] = array( 'file' => $url, 'type' => $type, 'name' => $filename, ); } echo json_encode($return); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 23
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 23
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/gb7sf
function name:  (null)
number of ops:  29
compiled vars:  !0 = $data, !1 = $return, !2 = $videos, !3 = $filename, !4 = $url, !5 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAL                                                 'http%3A%2F%2Fok.ru%2Fdk%3Fcmd%3DvideoPlayerMetadata%26mid%3D28339342042'
          3        DO_ICALL                                         $6      
          4        SEND_VAR                                                 $6
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !0, $7
    4     8        ASSIGN                                                   !1, <array>
    5     9        FETCH_DIM_R                                      ~10     !0, 'videos'
         10      > FE_RESET_R                                       $11     ~10, ->23
         11    > > FE_FETCH_R                                               $11, !2, ->23
    6    12    >   FETCH_DIM_R                                      ~12     !2, 'name'
         13        ASSIGN                                                   !3, ~12
    7    14        FETCH_DIM_R                                      ~14     !2, 'url'
         15        ASSIGN                                                   !4, ~14
    8    16        ASSIGN                                                   !5, 'mp4'
   11    17        INIT_ARRAY                                       ~18     !4, 'file'
   12    18        ADD_ARRAY_ELEMENT                                ~18     !5, 'type'
   13    19        ADD_ARRAY_ELEMENT                                ~18     !3, 'name'
   10    20        ASSIGN_DIM                                               !1
   13    21        OP_DATA                                                  ~18
    5    22      > JMP                                                      ->11
         23    >   FE_FREE                                                  $11
   17    24        INIT_FCALL                                               'json_encode'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $19     
         27        ECHO                                                     $19
   18    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.88 ms | 1396 KiB | 19 Q