Can anyone get access to my PHP source code?

With a correctly configured web server, the PHP code isn't visible to your website visitors. For the PHP code to be accessible by people who visit your website, the server would have to be configured to display it as text instead of processing it as PHP code.

So, in other words, if you visit your website and you see a HTML page and not PHP code, your server is working correctly and no one can get to the PHP code.


Which code? Your PHP source code? The only code a user see is your html code, PHP is processed on the server side!


If you're still paranoid after the assurances provided here, you can make your code much more difficult for someone else to read by "obfuscating" it (Wikipedia link).

If you Google "php obfuscator", you'll find tons of PHP obfuscator products, many of them free.

Some examples: PHP Obfuscator

Code Eclipse

Professional PHP Obfuscator/Encoder

Obfuscation does not affect performance. Only readability for humans.