What are the potential performance implications of using mod_rewrite to hide the .php extension?

Using mod_rewrite to hide the .php extension can potentially impact performance as it requires the server to process additional rewrite rules for each request. To optimize performance, it is recommended to use simpler rewrite rules and avoid unnecessary redirects.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]