If all you want to know is if it has a PDF extension, you could use basename() and pull just the last three characters to compare with.
$file = "path/to/file/name.pdf";
$confirm = (substr(basename($file), -3) == "pdf") ? "Yep, the extension is a PDF all right!" : "Nope, doesn't have PDF extension";
echo $confirm;
You could do it without the basename() function and just use the substr, but I personally like to narrow it down to just the file's name before I manipulate it with substr... It's a personal preference thing.