
I built a modern, open-source PHP code obfuscator (YakPro alternative)
About four months ago, my release pipeline suddenly broke because the official repository for YakPro Obfuscator simply vanished.
I was looking for a simple, effective way to add a layer of protection to my suite of AI-driven WordPress plugins before distributing them. I didn't want to rely on something like Ioncube because not every hosting provider supports the extension.
Since I couldn’t find a maintained alternative that reliably supported modern PHP syntax, I decided to build one.
I've been using it successfully in my own production pipelines for the last few months. It became pretty stable, so I wanted to announce it to the world.
Features
- Full Modern PHP Support: Built on
nikic/php-parserv5.x, supporting named arguments, enums, match expressions, readonly properties, intersection types, and even PHP 8.5's pipe operator and(void)cast. - Deobfuscation Resistance:
- Opaque Predicates: Hard-to-analyze expressions in control flow flattening.
- Dead Code Injection: Branches that never execute but confuse static analysis.
- Per-file XOR Encoding: String literals are encoded using unique random keys.
- Incremental Processing: Only process changed files since the last run.
- Multi-pass Analysis: Scrambles symbols consistently across your entire project.
- Clean Architecture: Modern PSR-4 OOP codebase with 100% test coverage for core components.
Ready for CI/CD, not just local machines
I included a ready-to-use GitHub Action, making it easy to integrate into your existing CI/CD pipeline. Every tagged release or production build can produce consistently obfuscated code without anyone remembering to run another command.
Add it to your release Github Action to obfuscate your code automatically:
steps:
- uses: iserter/php-obfuscator@v0.1.7
with:
source: 'src'
output: 'dist'
Available on Packagist/Composer too.
Install:
composer require iserter/php-obfuscator --dev
Use:
vendor/bin/obfuscate src/ -o dist/
Or use via Docker
If you’re a hygine freak for your host system, then here’s how you can use via Docker:
docker run --rm -v $(pwd):/app iserter/php-obfuscator src/ -o out/
See it on Github:
Repository: