I\'m trying to think of the fastest way to implement a case insensitive file_exists function in PHP. Is my best bet to enumerate the file in the directory and do a strtolowe
For a pure PHP implementation, yes. There's an example in the comments for the file_exists function.
The other option would be to run your script on a case insensitive file system.