I'm trying to get a file extension of a user uploaded image, I have learnt that several approaches exist to achieve this goal. I think this is currently the conversational way of getting the file extension:
$ext = pathinfo($_FILES["userfile"]["name"], PATHINFO_EXTENSION);
However, I find the following method to be more intuitive and memorable:
list(,$ext) = explode("/", $_FILES["userfile"]["type"]);
What are the drawbacks of taking the latter approach?