I am getting the below error message with this code to verify if the uploaded files are pdf and send via phpmailer.

Line 66 is where the "default:" at. If I delete default i get "die" error if i delete the next line become error and so on. Can someone please help. thx.

Parse error: syntax error, unexpected 'default' (T_DEFAULT) in /test.php on line 66
PHP Code:
    if ($_FILES['upload']['error'] !== UPLOAD_ERR_OK) {
"Upload failed with error " $_FILES['upload']['error']);
$finfo finfo_open(FILEINFO_MIME_TYPE);
$mime finfo_file($finfo$_FILES['upload']['tmp_name']);
$ok false;
    switch (
$mime) {
"Unknown/not permitted file type");
$ok true;
$_FILES['upload']['tmp_name'] as $uploadfile