How to browse php files in browsers without php extensions

i have problem when
browsing my php files in browsers they have the extensions which is not good.What can i do?

PHP has nothing to do with your browser.

PHP is evaluated at the server level, and is returned as HTML (or whatever form of script you’re writing). The browser never sees/evaluates PHP code.

Or do you mean the .php on the end of the file?
All files have an extension. I’m sure there’s some rewriting rules you can do in Apache to hide such things, but it seems like a lot just to hide the extension for no apparent reason?

Why the H would u want to ‘browse’ a php file???