# Obfuscator-Class **Repository Path**: marx88/Obfuscator-Class ## Basic Information - **Project Name**: Obfuscator-Class - **Description**: 来自大神的PHP代码混淆库 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-02-10 - **Last Updated**: 2025-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🔐 PHP Obfuscator Simple, easy-to-use and effective Obfuscator PHP class. **Not just a stupid `base64 encoding` script, but a real and effective obfuscation script.** Ideal to obfuscate some critical pieces of your software such as licensing verification functions. ## 👓 Overview If you want to keep your open source code private, but working on all Web hosting, this **Obfuscator** class is THE obfuscator you need! Not easily readable by developers (unless they are ready to spend lot of time). It will definitely discourage them! :smiley: ## 📓 Usage ### Take out `` If you specify code to be obfuscated with ` This is my PHP code, can be class class, interface, trait, etc. in PHP 5, 7, 7.2, 7.4 and higher. If you open the file, you will see that your code is totally hidden (obfuscated). ### Example 2 ```php
'; if ($hour < 10) { echo 'Have a good morning!'; } elseif ($hour < 20) { echo 'Have a good day!'; } else { echo 'Have a good night! zZz z'; } DATA; $sObfusationData = new Obfuscator($sData, 'Give a name to the piece of code you want to obfuscate'); file_put_contents('obfuscated_code.php', ''), '', $sData); // We strip the open/close PHP tags $sObfusationData = new Obfuscator($sData, 'Class/Code NAME'); file_put_contents($filename . '_obfuscated.php', ' [author-url]: https://ph7.me [license-url]: https://opensource.org/licenses/MIT [twitter-image]: https://img.shields.io/twitter/url/https/shields.io.svg?style=social [twitter-url]: https://twitter.com/phenrysay