3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode(file_get_contents('http://ok.ru/dk?cmd=videoPlayerMetadata&mid=31771331179'), true); $return = array(); foreach($data['videos'] as $videos){ $filename = $videos['name']; $url = $videos['url']; $type = 'mp4'; $return[] = array( 'file' => $url, 'type' => $type, 'label' => $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/82A3n
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
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAL                                                 'http%3A%2F%2Fok.ru%2Fdk%3Fcmd%3DvideoPlayerMetadata%26mid%3D31771331179'
          3        DO_ICALL                                         $6      
          4        SEND_VAR                                                 $6
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !0, $7
    3     8        ASSIGN                                                   !1, <array>
    4     9        FETCH_DIM_R                                      ~10     !0, 'videos'
         10      > FE_RESET_R                                       $11     ~10, ->23
         11    > > FE_FETCH_R                                               $11, !2, ->23
    5    12    >   FETCH_DIM_R                                      ~12     !2, 'name'
         13        ASSIGN                                                   !3, ~12
    6    14        FETCH_DIM_R                                      ~14     !2, 'url'
         15        ASSIGN                                                   !4, ~14
    7    16        ASSIGN                                                   !5, 'mp4'
   10    17        INIT_ARRAY                                       ~18     !4, 'file'
   11    18        ADD_ARRAY_ELEMENT                                ~18     !5, 'type'
   12    19        ADD_ARRAY_ELEMENT                                ~18     !3, 'label'
    9    20        ASSIGN_DIM                                               !1
   12    21        OP_DATA                                                  ~18
    4    22      > JMP                                                      ->11
         23    >   FE_FREE                                                  $11
   16    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:
167.83 ms | 1396 KiB | 19 Q