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"); ?>
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
http://ballerscv.media2/wp-content/uploads/formidablehttp://ballerscv.media2/wp-content/uploads/everyfile.mp4
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 http://ballerscv.media2/wp-content/uploads/formidablehttp://ballerscv.media2/wp-content/uploads/everyfile.mp4
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Notice: Use of undefined constant PATHINFO_FILENAME - assumed 'PATHINFO_FILENAME' in /in/qfPv7 on line 6 Warning: pathinfo() expects parameter 2 to be long, string given in /in/qfPv7 on line 6 http://ballerscv.media2/wp-content/uploads/formidablehttp://ballerscv.media2/wp-content/uploads/.mp4
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
216.79 ms | 401 KiB | 309 Q