PHPackages                             gkralik/php-uglifyjs - 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. gkralik/php-uglifyjs

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

gkralik/php-uglifyjs
====================

PHP Javascript packer

1.0.2(6y ago)35292.3k↓18.5%14[2 issues](https://github.com/gkralik/php-uglifyjs/issues)7LGPL-2.1-or-laterPHP

Since Aug 28Pushed 6y ago4 watchersCompare

[ Source](https://github.com/gkralik/php-uglifyjs)[ Packagist](https://packagist.org/packages/gkralik/php-uglifyjs)[ RSS](/packages/gkralik-php-uglifyjs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (7)

php-uglifyjs
============

[](#php-uglifyjs)

Installation
------------

[](#installation)

```
composer require "gkralik/php-uglifyjs:^1.0"

```

Usage
-----

[](#usage)

```
$myPacker = new GK\JavascriptPacker($script, 62, true, false);
$packed = $myPacker->pack();
```

or

```
$myPacker = new GK\JavascriptPacker($script, 'Normal', true, false);
$packed = $myPacker->pack();
```

or (default values)

```
$myPacker = new GK\JavascriptPacker($script);
$packed = $myPacker->pack();
```

### Constructor parameters:

[](#constructor-parameters)

NameDescription`$script`the JavaScript to pack, string.`$encoding`level of encoding, int or string: 0,10,62,95 or 'None', 'Numeric', 'Normal', 'High ASCII'. Default: 62.`$fastDecode`include the fast decoder in the packed result, boolean. Default : true.`$specialChars`if you are flagged your private and local variables in the script, boolean. Default: false.The `pack()` method return the compressed JavasScript, as a string.

See  for more information.

Acknowledgments
---------------

[](#acknowledgments)

Based on JavaScriptPacker by Nicolas Martin ().

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~372 days

Recently: every ~465 days

Total

6

Last Release

2420d ago

Major Versions

0.5.2 → 1.0.02015-10-10

### Community

Maintainers

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

---

Top Contributors

[![gkralik](https://avatars.githubusercontent.com/u/4949303?v=4)](https://github.com/gkralik "gkralik (9 commits)")[![m-hume](https://avatars.githubusercontent.com/u/3430210?v=4)](https://github.com/m-hume "m-hume (1 commits)")[![reestyle-it](https://avatars.githubusercontent.com/u/1517435?v=4)](https://github.com/reestyle-it "reestyle-it (1 commits)")

### Embed Badge

![Health badge](/badges/gkralik-php-uglifyjs/health.svg)

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

###  Alternatives

[laminas/laminas-stdlib

SPL extensions, array utilities, error handlers, and more

236103.2M438](/packages/laminas-laminas-stdlib)

PHPackages © 2026

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