As we all know it is possible to see the html, css and javascript code of any page on internet.(viewing the source code)
I tried to view the php code of websites and discovered that that’s not possible.
Is it considered dangerous/unsafe (for the websites security) to allow users to view the php codes?
or is it just that php is server-side scripting language?
The first step to bypassing any system or security, is knowledge of how it is designed or built. YES, if a malicious user can view your PHP source code, they CAN find ways to exploit it. If you have your server configured properly, then no outside (Web) user will be able to SEE the source, though.