3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'UU3dESJmRgwl8j3X80c9wTwg'; // YouTube API URL retrieves the fields we want in JSON format so that it's super easy to work with $api_url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=%s&key=AIzaSyAMUb-pd1gAIeNmu3nUrarg6_397QJQXEo'; // Get the videos for our user with 'wp_remote_get()' $response = http_get( sprintf($api_url, $username) , array("timeout"=>1), $info ); echo(response); echo($info); // Let's decode what we retrieved so that we can store it efficiently $item_data = json_decode( $info ); // If our info isn't in an array then these next steps won't work-- return false if ( !is_array( $item_data ) ) { return false; } // Let's sort through everything we've got. We'll keep the stuff we need and drop the rest from the array. $item_data = $item_data['feed']['entry']; foreach(array_keys($item_data) as $key) { echo($item_data[$key]['title']['$t']); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/RmBCq
function name:  (null)
number of ops:  38
compiled vars:  !0 = $username, !1 = $api_url, !2 = $response, !3 = $info, !4 = $item_data, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'UU3dESJmRgwl8j3X80c9wTwg'
    5     1        ASSIGN                                                   !1, 'https%3A%2F%2Fwww.googleapis.com%2Fyoutube%2Fv3%2FplaylistItems%3Fpart%3Dsnippet%26playlistId%3D%25s%26key%3DAIzaSyAMUb-pd1gAIeNmu3nUrarg6_397QJQXEo'
    8     2        INIT_FCALL_BY_NAME                                       'http_get'
          3        INIT_FCALL                                               'sprintf'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $8      
          7        SEND_VAR_NO_REF_EX                                       $8
          8        SEND_VAL_EX                                              <array>
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !2, $9
   10    12        FETCH_CONSTANT                                   ~11     'response'
         13        ECHO                                                     ~11
   11    14        ECHO                                                     !3
   14    15        INIT_FCALL                                               'json_decode'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !4, $12
   17    19        TYPE_CHECK                                  128  ~14     !4
         20        BOOL_NOT                                         ~15     ~14
         21      > JMPZ                                                     ~15, ->23
   18    22    > > RETURN                                                   <false>
   22    23    >   FETCH_DIM_R                                      ~16     !4, 'feed'
         24        FETCH_DIM_R                                      ~17     ~16, 'entry'
         25        ASSIGN                                                   !4, ~17
   24    26        INIT_FCALL                                               'array_keys'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $19     
         29      > FE_RESET_R                                       $20     $19, ->36
         30    > > FE_FETCH_R                                               $20, !5, ->36
   25    31    >   FETCH_DIM_R                                      ~21     !4, !5
         32        FETCH_DIM_R                                      ~22     ~21, 'title'
         33        FETCH_DIM_R                                      ~23     ~22, '%24t'
         34        ECHO                                                     ~23
   24    35      > JMP                                                      ->30
         36    >   FE_FREE                                                  $20
   26    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1400 KiB | 19 Q