How to make PHP code unreadable?
Some people coming from, for example, JavaScript may be wondering how to make PHP code unreadable.
While there are several ways to do this, it usually doesn’t make any sense. PHP code is executed on the server, and unlike HTML, CSS, or JavaScript, for example, the user has no way to see it. He only sees the finished results, in the form of rendered HTML code.
Most PHP programmers don’t try to obfuscate code because it usually doesn’t make any sense. We even try to write clearer and more readable code so that when we need to, we can develop it easily.
However, if for some reason you are sure that in your situation you need to obfuscate the code or make it unreadable, you can use one of the following solutions: