Parse error: syntax error, unexpected T_VARIABLE at start of function
<p>I have looked at this error all online and it mostly says that you're missing a semicolon but I cant find any missing semicolon I was hoping you guys could help me.</p>

<pre><code>&lt;?php // add_file.php
require 'log.php';
require 'dictionary.php';
function add_file($file = $_FILES["file"], $tags = $_POST["tags"] ){ // Parse error: syntax error, unexpected T_VARIABLE
    $tags = explode(",", $tags);
    if ($file["error"]&gt;0){
        log("add_file", "Error in file: ".$file["error"], "error");
        exit();
    } else {
        $file["deleted"] = false;
        $file["tags"] = $tags;
        $file["id"] = uniqid();
        $file["ext"] = pathinfo($file['name'], PATHINFO_EXTENSION);
        $file["name"] = pathinfo($file['name'], PATHINFO_FILENAME);
        $file["tags"][] = $file["ext"];
        $file["tags"][] = $file["type"];
        $file["tags"][] = explode("/", $file["type"])[0];
        $file["date_created"] = date(DateTime::ATOM);
        if (file_exists("files/" . $file["id"].".".$file['ext'])){
            $file["id"] = uniqid();
            $file["loc"] = "files/" . $file["id"].".".$file['ext'];
            move_uploaded_file($file["tmp_name"], $file["loc"]);
            log("add_file", "Added file at: ".$file["loc"]);
        } else {
            $file["loc"] = "files/" . $file["id"].".".$file['ext'];
            move_uploaded_file($file["tmp_name"], $file["loc"]);
            log("add_file", "Added file at: ".$file["loc"]);
        }
        dict_add("dictionary.json", $file);
    }
}

?&gt;
</code></pre>
