PHP encryption is a method of obfuscating scripts in such a way that it offers additional protection and prevents unauthorized editing of the scripts. This article discusses both encryption and decryption.
If you're interested, you can check out the actual encryption tool for this. In the above example, the complete sets of PHP codes are not visible and are replaced by an obfuscated method of encoding. This article attempts to explain the methods of encrypting and decrypting PHP scripts. One of the popular ways to encrypt scripts is to encode the scripts into another data format such as base 64 encoding.
The decryption process is the exact opposite of the encryption process. The scope of this article covers reversible encryption/decryption processes. Although in PHP it is possible to provide one-way encryption, with techniques such as MD5 encoding, this type of encoding cannot be reversed or decoded. It is ideal for storing passwords in the database, which adds an extra layer of security over storing them in text format. For some differences in the methods, see the screen shot below.
For example, WordPress uses MD5 encoding when storing passwords in the MySQL database. So even if the database has been compromised, the hacker cannot retrieve the actual password (in text format) being used for the admin login.