Hello, I have been writing code for someone, specifically making modifications to a user control panel. The client sent me the decrypted version of the code to make changes to. I assume he bought the software as he asked me to make the changes and he didn't himself, but what is the purpose of encrypting PHP code? And how is it even parsed properly after it's been encrypted? I'm just curious really interested any your answers.

Most servers have decryption software installed (e.g. Zend IonCube). You can encrypt your PHP scripts, upload them and they will run. They will not be readable to humans however, so if anybody accesses your webhost, downloading the scripts will be useless (although they can be brute force cracked).

Encyrption is used to secure data, mostly used for payments, password related issues and for some VIP materials.
We prefer to encrypt passwords to-from database. But its a mess to encrypt total php file. Anyway, there are lots of software to do encrypt-decrypt.

oic, pritaeas makes sense. Jessfly yes I know what encryption is and why it's used, was asking specifically why people do it to php scripts.