3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_bcv_filename($get_the_path){ $path_name = pathinfo($get_the_path, PATHINFO_DIRNAME); $base_name = pathinfo($get_the_path, PATHINFO_BASENAME); $file_name = pathinfo($get_the_path, PATHINFO_FILENAME); // get and store the files name $ext_name = pathinfo($get_the_path, PATHINFO_EXTENSION); // get and store the files original extension //echo $path_name; //echo $base_name; //$my_file_src = "http://ballerscv.media2/wp‑content/uploads/"; // get folder where converted files are now stored $my_file_src = "http://ballerscv.media2/wp-content/uploads/"; $new_file_ext =".mp4"; // non mp4 files are being converted to mp4 so will have this extension. // if the file is an mp4 file it won't be converted to mp4 so get the original file folder and extension if ( strtolower($ext_name) == "m4v" || strtolower($ext_name) == "mp4"){ //$my_file_src = "http://ballerscv.com/wp‑content/uploads/formidable/"; // set folder to original file folder $my_file_src = $path_name . "/" ; $new_file_ext = "." . $ext_name; // set extension to original extension } $new_file = $my_file_src . $file_name . $new_file_ext; return $new_file; } //echo pathinfo("http://ballerscv.com/wp‑content/uploads/formidable/everyfile.flv", PATHINFO_DIRNAME); echo get_bcv_filename("http://ballerscv.media2/wp-content/uploads/formidable/everyfile.flv"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MC7OW
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'get_bcv_filename'
          1        SEND_VAL                                                 'http%3A%2F%2Fballerscv.media2%2Fwp-content%2Fuploads%2Fformidable%2Feveryfile.flv'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   30     4      > RETURN                                                   1

Function get_bcv_filename:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 38
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
Branch analysis from position: 33
filename:       /in/MC7OW
function name:  get_bcv_filename
number of ops:  43
compiled vars:  !0 = $get_the_path, !1 = $path_name, !2 = $base_name, !3 = $file_name, !4 = $ext_name, !5 = $my_file_src, !6 = $new_file_ext, !7 = $new_file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'pathinfo'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !1, $8
    5     6        INIT_FCALL                                               'pathinfo'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !2, $10
    6    11        INIT_FCALL                                               'pathinfo'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 8
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
    7    16        INIT_FCALL                                               'pathinfo'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 4
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !4, $14
   12    21        ASSIGN                                                   !5, 'http%3A%2F%2Fballerscv.media2%2Fwp-content%2Fuploads%2F'
   13    22        ASSIGN                                                   !6, '.mp4'
   16    23        INIT_FCALL                                               'strtolower'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $18     
         26        IS_EQUAL                                         ~19     $18, 'm4v'
         27      > JMPNZ_EX                                         ~19     ~19, ->33
         28    >   INIT_FCALL                                               'strtolower'
         29        SEND_VAR                                                 !4
         30        DO_ICALL                                         $20     
         31        IS_EQUAL                                         ~21     $20, 'mp4'
         32        BOOL                                             ~19     ~21
         33    > > JMPZ                                                     ~19, ->38
   18    34    >   CONCAT                                           ~22     !1, '%2F'
         35        ASSIGN                                                   !5, ~22
   19    36        CONCAT                                           ~24     '.', !4
         37        ASSIGN                                                   !6, ~24
   22    38    >   CONCAT                                           ~26     !5, !3
         39        CONCAT                                           ~27     ~26, !6
         40        ASSIGN                                                   !7, ~27
   24    41      > RETURN                                                   !7
   25    42*     > RETURN                                                   null

End of function get_bcv_filename

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.13 ms | 1403 KiB | 18 Q