I\'m curious when these two functions will return different values. Also if you could clarify the difference between a path/directory/file that would be appreciated.
A directory tests true for exists, but false for isfile. There are a few different types of filesystem objects for which that is also true.
isfile means that it is a regular file. It is more specific than exists.