There comes a time in a programmers life when you want or need to grab the filename of a file, but not the file extension, while using PHP.
Here’s how to do just that:
$filename = pathinfo('./bin/myimage.jpg', PATHINFO_FILENAME);
It comes in handy when you want to do something with the filename without having the file extension there to get in the way. Please use responsibly.