3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spotify1="https://itunes.apple.com/search?term="; $spotify2=" - "; $spotify3="&limit=1"; $radio_info = array(); $radio_info['genre'] = ''; $radio_info['listeners'] = ''; $radio_info['now_playing'] = ''; $temp = array(); $search_for = "<td\s[^>]*class=\"streamdata\">(.*)<\/td>"; $search_td = array('<td class="streamdata">','</td>'); if(preg_match_all("/$search_for/siU",$stats_file_contents,$matches)) { foreach($matches[0] as $match) { $to_push = str_replace($search_td,'',$match); $to_push = trim($to_push); array_push($temp,$to_push); } } $radio_info['listeners'] = $temp[4]; $radio_info['genre'] = $temp[6]; //$radio_info['now_playing'] = $temp[8]; //$radio_info['now_playing'] = $temp[8]; $radio_info['info']['now_playing'] = $temp[8]; $x = explode(" - ",$temp[8]); $artist1 = $x[0]; $song1 = $x[1]; $artist1 = str_replace('&amp;', 'and', $artist1); $song1 = str_replace('&amp;', 'and', $song1); $ttt =" - "; $title = $artist1.$ttt.$song1; $img640_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img300_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img64_url= "https://i.deep1.ru/playingnow/logo_default.png"; echo $spotify_url=$spotify1.$artist1.$spotify2.$song1.$spotify3 ; echo $spotify_url = str_replace(' ', '+', $spotify_url); //$spotify_url = "https://itunes.apple.com/search?term=Kylie+Minogue"; $ch = curl_init($spotify_url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $spotify = curl_exec($ch); curl_close($ch); $obj = json_decode($spotify); //$total = $obj->resultCount->results; //$img640_url = $obj->resultCount[0]->results[1]->artworkUrl100; echo $img640_url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 41
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 40
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 40
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 41
filename:       /in/U5TYJ
function name:  (null)
number of ops:  116
compiled vars:  !0 = $spotify1, !1 = $spotify2, !2 = $spotify3, !3 = $radio_info, !4 = $temp, !5 = $search_for, !6 = $search_td, !7 = $stats_file_contents, !8 = $matches, !9 = $match, !10 = $to_push, !11 = $x, !12 = $artist1, !13 = $song1, !14 = $ttt, !15 = $title, !16 = $img640_url, !17 = $img300_url, !18 = $img64_url, !19 = $spotify_url, !20 = $ch, !21 = $headers, !22 = $spotify, !23 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fitunes.apple.com%2Fsearch%3Fterm%3D'
    7     1        ASSIGN                                                   !1, '+-+'
    8     2        ASSIGN                                                   !2, '%26limit%3D1'
   12     3        ASSIGN                                                   !3, <array>
   14     4        ASSIGN_DIM                                               !3, 'genre'
          5        OP_DATA                                                  ''
   15     6        ASSIGN_DIM                                               !3, 'listeners'
          7        OP_DATA                                                  ''
   16     8        ASSIGN_DIM                                               !3, 'now_playing'
          9        OP_DATA                                                  ''
   20    10        ASSIGN                                                   !4, <array>
   21    11        ASSIGN                                                   !5, '%3Ctd%5Cs%5B%5E%3E%5D%2Aclass%3D%22streamdata%22%3E%28.%2A%29%3C%5C%2Ftd%3E'
   22    12        ASSIGN                                                   !6, <array>
   23    13        INIT_FCALL                                               'preg_match_all'
         14        ROPE_INIT                                     3  ~35     '%2F'
         15        ROPE_ADD                                      1  ~35     ~35, !5
         16        ROPE_END                                      2  ~34     ~35, '%2FsiU'
         17        SEND_VAL                                                 ~34
         18        SEND_VAR                                                 !7
         19        SEND_REF                                                 !8
         20        DO_ICALL                                         $37     
         21      > JMPZ                                                     $37, ->41
   24    22    >   FETCH_DIM_R                                      ~38     !8, 0
         23      > FE_RESET_R                                       $39     ~38, ->40
         24    > > FE_FETCH_R                                               $39, !9, ->40
   25    25    >   INIT_FCALL                                               'str_replace'
         26        SEND_VAR                                                 !6
         27        SEND_VAL                                                 ''
         28        SEND_VAR                                                 !9
         29        DO_ICALL                                         $40     
         30        ASSIGN                                                   !10, $40
   26    31        INIT_FCALL                                               'trim'
         32        SEND_VAR                                                 !10
         33        DO_ICALL                                         $42     
         34        ASSIGN                                                   !10, $42
   27    35        INIT_FCALL                                               'array_push'
         36        SEND_REF                                                 !4
         37        SEND_VAR                                                 !10
         38        DO_ICALL                                                 
   24    39      > JMP                                                      ->24
         40    >   FE_FREE                                                  $39
   31    41    >   FETCH_DIM_R                                      ~46     !4, 4
         42        ASSIGN_DIM                                               !3, 'listeners'
         43        OP_DATA                                                  ~46
   32    44        FETCH_DIM_R                                      ~48     !4, 6
         45        ASSIGN_DIM                                               !3, 'genre'
         46        OP_DATA                                                  ~48
   35    47        FETCH_DIM_R                                      ~51     !4, 8
         48        FETCH_DIM_W                                      $49     !3, 'info'
         49        ASSIGN_DIM                                               $49, 'now_playing'
         50        OP_DATA                                                  ~51
   36    51        INIT_FCALL                                               'explode'
         52        SEND_VAL                                                 '+-+'
         53        FETCH_DIM_R                                      ~52     !4, 8
         54        SEND_VAL                                                 ~52
         55        DO_ICALL                                         $53     
         56        ASSIGN                                                   !11, $53
   37    57        FETCH_DIM_R                                      ~55     !11, 0
         58        ASSIGN                                                   !12, ~55
   38    59        FETCH_DIM_R                                      ~57     !11, 1
         60        ASSIGN                                                   !13, ~57
   39    61        INIT_FCALL                                               'str_replace'
         62        SEND_VAL                                                 '%26amp%3B'
         63        SEND_VAL                                                 'and'
         64        SEND_VAR                                                 !12
         65        DO_ICALL                                         $59     
         66        ASSIGN                                                   !12, $59
   40    67        INIT_FCALL                                               'str_replace'
         68        SEND_VAL                                                 '%26amp%3B'
         69        SEND_VAL                                                 'and'
         70        SEND_VAR                                                 !13
         71        DO_ICALL                                         $61     
         72        ASSIGN                                                   !13, $61
   41    73        ASSIGN                                                   !14, '+-+'
   42    74        CONCAT                                           ~64     !12, !14
         75        CONCAT                                           ~65     ~64, !13
         76        ASSIGN                                                   !15, ~65
   43    77        ASSIGN                                                   !16, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   44    78        ASSIGN                                                   !17, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   45    79        ASSIGN                                                   !18, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   50    80        CONCAT                                           ~70     !0, !12
         81        CONCAT                                           ~71     ~70, !1
         82        CONCAT                                           ~72     ~71, !13
         83        CONCAT                                           ~73     ~72, !2
         84        ASSIGN                                           ~74     !19, ~73
         85        ECHO                                                     ~74
   52    86        INIT_FCALL                                               'str_replace'
         87        SEND_VAL                                                 '+'
         88        SEND_VAL                                                 '%2B'
         89        SEND_VAR                                                 !19
         90        DO_ICALL                                         $75     
         91        ASSIGN                                           ~76     !19, $75
         92        ECHO                                                     ~76
   57    93        INIT_FCALL_BY_NAME                                       'curl_init'
         94        SEND_VAR_EX                                              !19
         95        DO_FCALL                                      0  $77     
         96        ASSIGN                                                   !20, $77
   58    97        INIT_FCALL_BY_NAME                                       'curl_setopt'
         98        SEND_VAR_EX                                              !20
         99        FETCH_CONSTANT                                   ~79     'CURLOPT_HTTPHEADER'
        100        SEND_VAL_EX                                              ~79
        101        SEND_VAR_EX                                              !21
        102        DO_FCALL                                      0          
   59   103        INIT_FCALL_BY_NAME                                       'curl_exec'
        104        SEND_VAR_EX                                              !20
        105        DO_FCALL                                      0  $81     
        106        ASSIGN                                                   !22, $81
   61   107        INIT_FCALL_BY_NAME                                       'curl_close'
        108        SEND_VAR_EX                                              !20
        109        DO_FCALL                                      0          
   65   110        INIT_FCALL                                               'json_decode'
        111        SEND_VAR                                                 !22
        112        DO_ICALL                                         $84     
        113        ASSIGN                                                   !23, $84
   68   114        ECHO                                                     !16
        115      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.06 ms | 1404 KiB | 25 Q