PHP file extension

Never used ‘pathinfo’ before, but I can see its uses..
Personally, I would explode on the ‘/’, then on the ‘.’, etc…