// Other variables $MAX_FILENAME_LENGTH = 260; $file_name = $_FILES[$upload_name][\'name\']; //echo \"testing-\".$file_name.\"\"; //$file_name = strtolower
Since it raise a flag for over 10 years, but works just fine and return the expected value, a little stfu operator is the goodiest bad practice you are all looking for:
$file_extension = @end(explode('.', $file_name));