3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start("ob_gzhandler"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/TR/REC-html40"> <head> <LINK REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="../style.css.php"> <script LANGUAGE="javascript" TYPE="text/javascript" SRC="../script.js.php"></script> <script type="text/javascript"> <!--// function shrink(){ document.getElementById("MediaPlayer1").style.width=384; document.getElementById("MediaPlayer1").style.height=300; } function enLarge(){ document.getElementById("MediaPlayer1").style.width=480; document.getElementById("MediaPlayer1").style.height=402; } //--> </script> <title></title> </head><body><a name='top'></a><H3><center>Videos</center></h3> <p class='logo'> <button onclick="enLarge()">large</button> <button onclick="shrink()">small</button> <a href='..'>Main Menu</a> <A HREF="http://www.microsoft.com/windows/windowsmedia/player/download/"><IMG ALT="Get Windows Media Player" SRC="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" WIDTH="88" HEIGHT="31" BORDER="0"></A><br> <OBJECT ID="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <PARAM NAME="fileName" VALUE=""> <PARAM NAME="showControls" VALUE="true"> <PARAM NAME="PlayCount" VALUE="0"> <PARAM NAME="animationatStart" VALUE="true"> <PARAM NAME="transparentatStart" VALUE="true"> <PARAM NAME="autoStart" VALUE="true"> <EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="" name="MediaPlayer1" width=360 height=260 AutoStart=true></EMBED></object></p> <div style='float:left; text-align:left;'> <?php $p = split('/', $_SERVER['SCRIPT_FILENAME']); $script_name = $p[count($p)-1]; $path = str_replace($script_name, '', $_SERVER['SCRIPT_FILENAME']); $dir_handle = @opendir($path) or die("Unable to open $path"); Function get_Extension($m_FileName){ $path_parts = pathinfo($m_FileName); if ($path_parts["extension"]) { $m_Extension = strtolower($path_parts["extension"]); return(strtoupper($m_Extension)); } else { return "unknown"; } } function check_image($filename){ $temp=strtoupper(get_Extension($filename)); if(($temp=="MP3")||($temp=="WMA")||($temp=="WMV")||($temp=="ASF")) return (true); else return (false); } Function get_Files($path) { if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if(!is_dir($file) && substr($file,O,1) != "."){ $m_Files[]=$file; } } closedir($handle); } if(sizeof($m_Files)>1) asort($m_Files); return $m_Files; } $files=get_Files($path); $filter_files=array_filter($files,"check_image"); $maxnr=sizeof($filter_files)-1; sort($filter_files); for ($i=0;$i<sizeof($filter_files);$i++){ echo "<a class='button' onclick=\"MediaPlayer1.SRC='$filter_files[$i]';MediaPlayer1.fileName='$filter_files[$i]';\">"; echo substr($filter_files[$i], 0, strlen($filter_files[$i])-4); echo "</a><br>"; } closedir($dir_handle); ?></table> </body></html> <?php ob_flush(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 52
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 52
Branch analysis from position: 75
Branch analysis from position: 52
filename:       /in/emJPf
function name:  (null)
number of ops:  82
compiled vars:  !0 = $p, !1 = $script_name, !2 = $path, !3 = $dir_handle, !4 = $files, !5 = $filter_files, !6 = $maxnr, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'ob_start'
          1        SEND_VAL                                                 'ob_gzhandler'
          2        DO_ICALL                                                 
    2     3        ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+HTML+4.01+Transitional%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Floose.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2FTR%2FREC-html40%22%3E%0A%3Chead%3E%0A%3CLINK+REL%3D%22stylesheet%22+TYPE%3D%22text%2Fcss%22+MEDIA%3D%22all%22+HREF%3D%22..%2Fstyle.css.php%22%3E%0A%3Cscript+LANGUAGE%3D%22javascript%22+TYPE%3D%22text%2Fjavascript%22+SRC%3D%22..%2Fscript.js.php%22%3E%3C%2Fscript%3E%0A%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A%3C%21--%2F%2F%0Afunction+shrink%28%29%7B%0A+document.getElementById%28%22MediaPlayer1%22%29.style.width%3D384%3B%0A+document.getElementById%28%22MediaPlayer1%22%29.style.height%3D300%3B%0A%7D%0Afunction+enLarge%28%29%7B%0A+document.getElementById%28%22MediaPlayer1%22%29.style.width%3D480%3B%0A+document.getElementById%28%22MediaPlayer1%22%29.style.height%3D402%3B%0A%7D%0A+%2F%2F--%3E%0A%3C%2Fscript%3E%0A%3Ctitle%3E%3C%2Ftitle%3E%0A%3C%2Fhead%3E%3Cbody%3E%3Ca+name%3D%27top%27%3E%3C%2Fa%3E%3CH3%3E%3Ccenter%3EVideos%3C%2Fcenter%3E%3C%2Fh3%3E%0A%3Cp+class%3D%27logo%27%3E%0A%3Cbutton+onclick%3D%22enLarge%28%29%22%3Elarge%3C%2Fbutton%3E%0A%3Cbutton+onclick%3D%22shrink%28%29%22%3Esmall%3C%2Fbutton%3E%0A%3Ca+href%3D%27..%27%3EMain+Menu%3C%2Fa%3E%0A%3CA+HREF%3D%22http%3A%2F%2Fwww.microsoft.com%2Fwindows%2Fwindowsmedia%2Fplayer%2Fdownload%2F%22%3E%3CIMG+ALT%3D%22Get+Windows+Media+Player%22+SRC%3D%22http%3A%2F%2Fwww.microsoft.com%2Fwindows%2Fwindowsmedia%2Fimages%2Flogos%2Fgetwm%2Fmp11_88x31_static.gif%22+WIDTH%3D%2288%22+HEIGHT%3D%2231%22+BORDER%3D%220%22%3E%3C%2FA%3E%3Cbr%3E%0A%3COBJECT+ID%3D%22MediaPlayer1%22+width%3D384+height%3D300+classid%3D%22CLSID%3A22D6F312-B0F6-11D0-94AB-0080C74C7E95%22+codebase%3D%22http%3A%2F%2Factivex.microsoft.com%2Factivex%2Fcontrols%2Fmplayer%2Fen%2Fnsmp2inf.cab%23Version%3D6%2C0%2C02%2C902%22+standby%3D%22Loading+Microsoft+Windows+Media+Player+components...%22+type%3D%22application%2Fx-oleobject%22%3E%0A%3CPARAM+NAME%3D%22fileName%22+VALUE%3D%22%22%3E%0A%3CPARAM+NAME%3D%22showControls%22+VALUE%3D%22true%22%3E%0A%3CPARAM+NAME%3D%22PlayCount%22+VALUE%3D%220%22%3E%0A%3CPARAM+NAME%3D%22animationatStart%22+VALUE%3D%22true%22%3E%0A%3CPARAM+NAME%3D%22transparentatStart%22+VALUE%3D%22true%22%3E%0A%3CPARAM+NAME%3D%22autoStart%22+VALUE%3D%22true%22%3E%0A%3CEMBED+type%3D%22application%2Fx-mplayer2%22+pluginspage%3D%22http%3A%2F%2Fwww.microsoft.com%2FWindows%2FMediaPlayer%2F%22+SRC%3D%22%22+name%3D%22MediaPlayer1%22+width%3D360+height%3D260+AutoStart%3Dtrue%3E%3C%2FEMBED%3E%3C%2Fobject%3E%3C%2Fp%3E%0A%3Cdiv+style%3D%27float%3Aleft%3B+text-align%3Aleft%3B%27%3E%0A'
   35     4        INIT_FCALL_BY_NAME                                       'split'
          5        SEND_VAL_EX                                              '%2F'
          6        CHECK_FUNC_ARG                                           
          7        FETCH_FUNC_ARG               global              $9      '_SERVER'
          8        FETCH_DIM_FUNC_ARG                               $10     $9, 'SCRIPT_FILENAME'
          9        SEND_FUNC_ARG                                            $10
         10        DO_FCALL                                      0  $11     
         11        ASSIGN                                                   !0, $11
   36    12        COUNT                                            ~13     !0
         13        SUB                                              ~14     ~13, 1
         14        FETCH_DIM_R                                      ~15     !0, ~14
         15        ASSIGN                                                   !1, ~15
   37    16        INIT_FCALL                                               'str_replace'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 ''
         19        FETCH_R                      global              ~17     '_SERVER'
         20        FETCH_DIM_R                                      ~18     ~17, 'SCRIPT_FILENAME'
         21        SEND_VAL                                                 ~18
         22        DO_ICALL                                         $19     
         23        ASSIGN                                                   !2, $19
   38    24        BEGIN_SILENCE                                    ~21     
         25        INIT_FCALL                                               'opendir'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $22     
         28        END_SILENCE                                              ~21
         29        ASSIGN                                           ~23     !3, $22
         30      > JMPNZ_EX                                         ~23     ~23, ->35
         31    >   NOP                                                      
         32        FAST_CONCAT                                      ~24     'Unable+to+open+', !2
         33      > EXIT                                                     ~24
         34*       BOOL                                             ~23     <true>
   65    35    >   INIT_FCALL                                               'get_files'
         36        SEND_VAR                                                 !2
         37        DO_FCALL                                      0  $25     
         38        ASSIGN                                                   !4, $25
   66    39        INIT_FCALL                                               'array_filter'
         40        SEND_VAR                                                 !4
         41        SEND_VAL                                                 'check_image'
         42        DO_ICALL                                         $27     
         43        ASSIGN                                                   !5, $27
   67    44        COUNT                                            ~29     !5
         45        SUB                                              ~30     ~29, 1
         46        ASSIGN                                                   !6, ~30
   68    47        INIT_FCALL                                               'sort'
         48        SEND_REF                                                 !5
         49        DO_ICALL                                                 
   69    50        ASSIGN                                                   !7, 0
         51      > JMP                                                      ->72
   70    52    >   ROPE_INIT                                     5  ~37     '%3Ca+class%3D%27button%27+onclick%3D%22MediaPlayer1.SRC%3D%27'
         53        FETCH_DIM_R                                      ~34     !5, !7
         54        ROPE_ADD                                      1  ~37     ~37, ~34
         55        ROPE_ADD                                      2  ~37     ~37, '%27%3BMediaPlayer1.fileName%3D%27'
         56        FETCH_DIM_R                                      ~35     !5, !7
         57        ROPE_ADD                                      3  ~37     ~37, ~35
         58        ROPE_END                                      4  ~36     ~37, '%27%3B%22%3E'
         59        ECHO                                                     ~36
   71    60        INIT_FCALL                                               'substr'
         61        FETCH_DIM_R                                      ~40     !5, !7
         62        SEND_VAL                                                 ~40
         63        SEND_VAL                                                 0
         64        FETCH_DIM_R                                      ~41     !5, !7
         65        STRLEN                                           ~42     ~41
         66        SUB                                              ~43     ~42, 4
         67        SEND_VAL                                                 ~43
         68        DO_ICALL                                         $44     
         69        ECHO                                                     $44
   72    70        ECHO                                                     '%3C%2Fa%3E%3Cbr%3E'
   69    71        PRE_INC                                                  !7
         72    >   COUNT                                            ~46     !5
         73        IS_SMALLER                                               !7, ~46
         74      > JMPNZ                                                    ~47, ->52
   74    75    >   INIT_FCALL                                               'closedir'
         76        SEND_VAR                                                 !3
         77        DO_ICALL                                                 
         78        ECHO                                                     '%3C%2Ftable%3E%0A%3C%2Fbody%3E%3C%2Fhtml%3E%0A'
   76    79        INIT_FCALL                                               'ob_flush'
         80        DO_ICALL                                                 
         81      > RETURN                                                   1

Function get_extension:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/emJPf
function name:  get_Extension
number of ops:  19
compiled vars:  !0 = $m_FileName, !1 = $path_parts, !2 = $m_Extension
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV                                             !0      
   40     1        INIT_FCALL                                               'pathinfo'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   41     5        FETCH_DIM_R                                      ~5      !1, 'extension'
          6      > JMPZ                                                     ~5, ->17
   42     7    >   INIT_FCALL                                               'strtolower'
          8        FETCH_DIM_R                                      ~6      !1, 'extension'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   43    12        INIT_FCALL                                               'strtoupper'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $9      
         15      > RETURN                                                   $9
         16*       JMP                                                      ->18
   45    17    > > RETURN                                                   'unknown'
   46    18*     > RETURN                                                   null

End of function get_extension

Function check_image:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 15
Branch analysis from position: 12
filename:       /in/emJPf
function name:  check_image
number of ops:  23
compiled vars:  !0 = $filename, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   RECV                                             !0      
   48     1        INIT_FCALL                                               'strtoupper'
          2        INIT_FCALL                                               'get_extension'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
   49     8        IS_EQUAL                                         ~5      !1, 'MP3'
          9      > JMPNZ_EX                                         ~5      ~5, ->12
         10    >   IS_EQUAL                                         ~6      !1, 'WMA'
         11        BOOL                                             ~5      ~6
         12    > > JMPNZ_EX                                         ~5      ~5, ->15
         13    >   IS_EQUAL                                         ~7      !1, 'WMV'
         14        BOOL                                             ~5      ~7
         15    > > JMPNZ_EX                                         ~5      ~5, ->18
         16    >   IS_EQUAL                                         ~8      !1, 'ASF'
         17        BOOL                                             ~5      ~8
         18    > > JMPZ                                                     ~5, ->21
         19    > > RETURN                                                   <true>
         20*       JMP                                                      ->22
   50    21    > > RETURN                                                   <false>
   51    22*     > RETURN                                                   null

End of function check_image

Function get_files:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 32
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 7
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 7
Branch analysis from position: 29
Branch analysis from position: 7
Branch analysis from position: 23
Branch analysis from position: 20
Branch analysis from position: 32
filename:       /in/emJPf
function name:  get_Files
number of ops:  40
compiled vars:  !0 = $path, !1 = $handle, !2 = $file, !3 = $m_Files
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
   53     1        INIT_FCALL                                               'opendir'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                           ~5      !1, $4
          5      > JMPZ                                                     ~5, ->32
   54     6    > > JMP                                                      ->23
   55     7    >   INIT_FCALL                                               'is_dir'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $6      
         10        BOOL_NOT                                         ~7      $6
         11      > JMPZ_EX                                          ~7      ~7, ->20
         12    >   INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !2
         14        FETCH_CONSTANT                                   ~8      'O'
         15        SEND_VAL                                                 ~8
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $9      
         18        IS_NOT_EQUAL                                     ~10     $9, '.'
         19        BOOL                                             ~7      ~10
         20    > > JMPZ                                                     ~7, ->23
   56    21    >   ASSIGN_DIM                                               !3
         22        OP_DATA                                                  !2
   54    23    >   INIT_FCALL                                               'readdir'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $12     
         26        ASSIGN                                           ~13     !2, $12
         27        TYPE_CHECK                                  1018          ~13
         28      > JMPNZ                                                    ~14, ->7
   59    29    >   INIT_FCALL                                               'closedir'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
   61    32    >   COUNT                                            ~16     !3
         33        IS_SMALLER                                               1, ~16
         34      > JMPZ                                                     ~17, ->38
   62    35    >   INIT_FCALL                                               'asort'
         36        SEND_REF                                                 !3
         37        DO_ICALL                                                 
   63    38    > > RETURN                                                   !3
   64    39*     > RETURN                                                   null

End of function get_files

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.91 ms | 1415 KiB | 43 Q