Can someone please explain me what is the best way to extract a file extension in PHP? I assume there is a built-in function for that.
You can use pathinfo().
$extention = pathinfo($yourfilename, PATHINFO_EXTENSION);
It looks like you're new here. If you want to get involved, click one of these buttons!