PHPackages                             dmitryrechkin/php-obfuscator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dmitryrechkin/php-obfuscator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dmitryrechkin/php-obfuscator
============================

A basic but functional PHP obfuscator for object oriented PHP

v1.1.0(9mo ago)025MITPHPPHP &gt;=7.4

Since Jan 15Pushed 9mo agoCompare

[ Source](https://github.com/dmitryrechkin/php-obfuscator)[ Packagist](https://packagist.org/packages/dmitryrechkin/php-obfuscator)[ RSS](/packages/dmitryrechkin-php-obfuscator/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (6)Versions (4)Used By (0)

PHP Obfuscator
==============

[](#php-obfuscator)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0a974aea1442e06d9952fe35c8e7f1fdce02bbfafa9330f780db744871a1173c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e616e6561752f7068702d6f626675736361746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/naneau/php-obfuscator/?branch=master)

This is an "obfuscator" for PSR/OOp PHP code. Different from other obfuscators, which often use a (reversible) `eval()` based obfuscation, this tool actually [parses PHP](https://github.com/nikic/PHP-Parser), and obfuscates variable names, methods, etc. This means is can not be reversed by tools such as [UnPHP](http://www.unphp.net).

This library was written out of the need to obfuscate the source for a private library which for various reasons could not be shared without steps to protect the source from prying eyes. It is not technically feasible to "encrypt" PHP source code, while retaining the option to run it on a standard PHP runtime. Tools such as [Zend Guard](http://www.zend.com/products/guard) use run-time plugins, but even these offer no real security.

While this tool does not make PHP code impossible to read, it will make it significantly less legible.

It is compatible with PHP 5.3, 5.4 and 5.5, but needs PHP 5.4+ to run.

Usage
-----

[](#usage)

After cloning this repository (`git clone https://github.com/naneau/php-obfuscator`) and installing the dependencies through Composer (`composer install`), run the following command to obfuscate a directory of PHP files:

```
./bin/obfuscate obfuscate /input/directory /output/directory
```

If you've installed this package through [Composer](https://getcomposer.org), you'll find the `obfuscate` command in the relevant [bin dir](https://getcomposer.org/doc/articles/vendor-binaries.md).

### Configuration

[](#configuration)

You may find that you'll need to prevent certain variables and methods from being renamed. In this case you can create a simple YAML configuration file

```
parameters:

    # Ignore variable names
    obfuscator.scramble_variable.ignore:
        - foo
        - bar
        - baz

    # Ignore certain methods names
    obfuscator.scramble_private_method.ignore:
        - foo
        - bar
        - baz
```

You can run the obfuscator with a configuration file through

```
./bin/obfuscate obfuscate /input/directory /output/directory --config=/foo/bar/config.yml
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance56

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~489 days

Total

3

Last Release

288d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c922ad9bb922aa9ba86d148a0db701bfb686a5d030b54cc9e030046482e46dab?d=identicon)[dmitryrechkin](/maintainers/dmitryrechkin)

---

Top Contributors

[![naneau](https://avatars.githubusercontent.com/u/89551?v=4)](https://github.com/naneau "naneau (28 commits)")[![dmitryrechkin](https://avatars.githubusercontent.com/u/9942426?v=4)](https://github.com/dmitryrechkin "dmitryrechkin (6 commits)")[![gburtini](https://avatars.githubusercontent.com/u/780031?v=4)](https://github.com/gburtini "gburtini (3 commits)")[![Red54](https://avatars.githubusercontent.com/u/2240638?v=4)](https://github.com/Red54 "Red54 (1 commits)")[![SamvelG](https://avatars.githubusercontent.com/u/2779831?v=4)](https://github.com/SamvelG "SamvelG (1 commits)")[![artmatsak](https://avatars.githubusercontent.com/u/5328078?v=4)](https://github.com/artmatsak "artmatsak (1 commits)")[![SikiFn](https://avatars.githubusercontent.com/u/2743862?v=4)](https://github.com/SikiFn "SikiFn (1 commits)")[![hanxue](https://avatars.githubusercontent.com/u/760008?v=4)](https://github.com/hanxue "hanxue (1 commits)")[![maltethirty4](https://avatars.githubusercontent.com/u/8967456?v=4)](https://github.com/maltethirty4 "maltethirty4 (1 commits)")

### Embed Badge

![Health badge](/badges/dmitryrechkin-php-obfuscator/health.svg)

```
[![Health](https://phpackages.com/badges/dmitryrechkin-php-obfuscator/health.svg)](https://phpackages.com/packages/dmitryrechkin-php-obfuscator)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
