PHPackages                             naneau/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. naneau/php-obfuscator

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

naneau/php-obfuscator
=====================

A basic but functional PHP obfuscator for object oriented PHP

0.0.5(10y ago)6103.6k185[14 issues](https://github.com/naneau/php-obfuscator/issues)[4 PRs](https://github.com/naneau/php-obfuscator/pulls)MITPHP

Since Sep 11Pushed 5y ago46 watchersCompare

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

READMEChangelogDependencies (6)Versions (6)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

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.7% 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 ~115 days

Total

5

Last Release

3852d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89551?v=4)[Maurice Fonk](/maintainers/naneau)[@naneau](https://github.com/naneau)

---

Top Contributors

[![naneau](https://avatars.githubusercontent.com/u/89551?v=4)](https://github.com/naneau "naneau (28 commits)")[![gburtini](https://avatars.githubusercontent.com/u/780031?v=4)](https://github.com/gburtini "gburtini (3 commits)")[![maltethirty4](https://avatars.githubusercontent.com/u/8967456?v=4)](https://github.com/maltethirty4 "maltethirty4 (1 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)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/naneau-php-obfuscator/health.svg)](https://phpackages.com/packages/naneau-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)
