Apache-style multiviews with Nginx
You don't need any tedious rewrites, try_files works perfectly for this. It's essentially only one line.
server {
server_name foo.com;
root /your/root/path;
index index.php;
location /
try_files $uri.php $uri/ /notfound.html;
}
# Your standard PHP location and everything else is still required here.
}