If I have a file in the path called inc.php and another file called inc.php in the same directory as index.php, and in index.php I place
include('inc.php')
Which file will be included?
When you do an include, PHP searches through each entry in the include path checking for the existence of the file until it finds it, whereupon it includes the file from that entry in the include path.
Typically, the include path has . (the current working directory) as its first entry.
So unless you've changed the include_path so that . is no longer the first entry, it will include the file from the current working directory because it's also the first copy of the file that it finds in the include_path.