// Other variables $MAX_FILENAME_LENGTH = 260; $file_name = $_FILES[$upload_name][\'name\']; //echo \"testing-\".$file_name.\"\"; //$file_name = strtolower
end(...[explode('.', $file_name)]) has worked since PHP 5.6. This is documented in the RFC although not in PHP docs themselves.
end(...[explode('.', $file_name)])