PHPackages                             tinymeng/enphp - 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. [Security](/categories/security)
4. /
5. tinymeng/enphp

ActiveLibrary[Security](/categories/security)

tinymeng/enphp
==============

a Open Source PHP Code Confusion + Encryption Project

v1.0.0(2y ago)11373[2 issues](https://github.com/majiameng/enphp/issues)MITPHPPHP &gt;=7.0.0

Since May 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/majiameng/enphp)[ Packagist](https://packagist.org/packages/tinymeng/enphp)[ RSS](/packages/tinymeng-enphp/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

EnPHP
=====

[](#enphp)

[![LOGO](https://github.com/majiameng/enphp/raw/master/example/logo.png)](https://github.com/majiameng/enphp/blob/master/example/logo.png)

PHP Enphp Class
===============

[](#php-enphp-class)

您可以在网站上找到tinymeng/enphp。查看“入门”页面以获取快速概述。
----------------------------------------

[](#您可以在网站上找到tinymengenphp查看入门页面以获取快速概述)

- [Wiki Home](https://github.com/majiameng/enphp/wiki)

Installation
============

[](#installation)

```
composer require tinymeng/enphp  -vvv

```

请开启以下函数

```
exec

```

```
// 一个开源加密混淆 PHP 代码项目
// a Open Source PHP Code Confusion + Encryption Project

```

项目地址
----

[](#项目地址)

GITHUB：

背景
--

[](#背景)

```
曾经，作者也是商业软件开发者中小将一名，软件总是被人破解，于是花了几个月研究了 EnPHP。
这套项目也有偿提供过给很多人，不过，应该网上存在不少破解了。
项目主要贵在为大家提供一个加密混淆和还原的思路。
// 严禁用于非法用途。

```

加密效果
----

[](#加密效果)

[![LOGO](https://github.com/majiameng/enphp/raw/master/example/encode.png)](https://github.com/majiameng/enphp/raw/master/example/encode.png)

回归测试脚本：
-------

[](#回归测试脚本)

可以将你要测试的代码放至 code\_test 中，运行命令：

```
php code_test.php

```

程序会自动进行回归测试，我也放了一些之前要测试的脚本在里边

P.S.

```
本来，还实现了 goto + xor 变种，不过兼容性和性能有点差，等有时间精力的时候再研究罢...

```

一些注意事项
======

[](#一些注意事项)

如何让 EnPHP 加密强度更高？
-----------------

[](#如何让-enphp-加密强度更高)

1. 将全局逻辑尽量变成类方法，EnPHP 对类加密会有更好的加密混淆效果
2. 对于 class 的变量初始化请放至析构（\_\_construct）方法中
3. 对于多维数组能用数字下标尽量用数字
4. 使用注释加密加强混淆强度

在混淆类名时，代码一定要有先后顺序：
------------------

[](#在混淆类名时代码一定要有先后顺序)

```
interface i {
    function init($a, $b);
}

class ii implements i {
    // PHP 中继承的参数名可以不一样
    function init($b, $c) {
        echo $b, $c;
    }
}

```

```
namespace a{
    class b{
    }
    # 正确
    $b = new \a\b();
    # 错误
    #$b = new b():
}

```

使用注释语法加密字符串（支持字符串+数字）：
----------------------

[](#使用注释语法加密字符串支持字符串数字)

```
   //格式：/**/要二次混淆的内容/**/
   $a = /**/"明文数据1"/**/;
   echo /**/2/**/;
   print(/**/"明文数据3"/**/);

```

使用注释语法去除代码：
-----------

[](#使用注释语法去除代码)

```
   echo 1;
   /**/
   echo 2;
   /**/
   echo 3;
   //格式：/**/要隐藏的代码/**/

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

768d ago

### Community

Maintainers

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

---

Top Contributors

[![majiameng](https://avatars.githubusercontent.com/u/24783993?v=4)](https://github.com/majiameng "majiameng (13 commits)")

---

Tags

phptinymengenphpphp-enphp

### Embed Badge

![Health badge](/badges/tinymeng-enphp/health.svg)

```
[![Health](https://phpackages.com/badges/tinymeng-enphp/health.svg)](https://phpackages.com/packages/tinymeng-enphp)
```

###  Alternatives

[stymiee/php-simple-encryption

The PHP Simple Encryption library is designed to simplify the process of encrypting and decrypting data while ensuring best practices are followed. By default is uses a secure encryption algorithm and generates a cryptologically strong initialization vector so developers do not need to becomes experts in encryption to securely store sensitive data.

449.2k](/packages/stymiee-php-simple-encryption)[ukrbublik/openssl_x509_crl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

182.1k](/packages/ukrbublik-openssl-x509-crl)

PHPackages © 2026

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