3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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"); ?>
based on qfPv7
Output for 5.2.0 - 7.2.0
http://ballerscv.media2/wp-content/uploads/everyfile.mp4
Output for 4.3.2 - 5.1.6
Notice: Use of undefined constant PATHINFO_FILENAME - assumed 'PATHINFO_FILENAME' in /in/MC7OW on line 6 Warning: pathinfo() expects parameter 2 to be long, string given in /in/MC7OW on line 6 http://ballerscv.media2/wp-content/uploads/.mp4
Output for 4.3.0 - 4.3.1

Process exited with code 139.