The apache rewrite rule will do this for you. The only limitation is that you cannot have a file named "somefile.php" and a directory called "somefile" (although you still have directories.
Here's an example rule that supports multiple file names (just enter it in the .htaccess file).
RewriteEngine on
RewriteRule ^(somefile1|somefile2|somefile3) $1.php
/somefile1 /somefile 1.php,/somefile2 /somefile2.php /somefile 3 /somefile3.php.