PHPackages                             searchturbine/phpwee-php-minifier - 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. searchturbine/phpwee-php-minifier

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

searchturbine/phpwee-php-minifier
=================================

A PHP minifier for HTML, CSS and JS files.

832.5k45[10 issues](https://github.com/searchturbine/phpwee-php-minifier/issues)[4 PRs](https://github.com/searchturbine/phpwee-php-minifier/pulls)1PHP

Since Mar 28Pushed 6y ago5 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (1)

phpwee-php-minifier
===================

[](#phpwee-php-minifier)

PHPWee is an inline PHP minifier for web resources. It lets you minify HTML4, HTML5, XHTML, CSS and JavaScript files in a single line of code.

The best bit is its free and open source under the BSD license.

Installing PHPWee
-----------------

[](#installing-phpwee)

Installing PHPWee should only take a minute. Here are you 3 choices:

- Download from SearchTurbine.com -
- Install a Composer package form Packagist.com -
- Hit the 'Download Zip' button on GitHub.

You can include all the necessary classes by simply including the phpwee-php-minifier/phpwee.php file.

```
require_once ("phpwee-php-minifier/phpwee.php");
```

Using PHPWee
------------

[](#using-phpwee)

How to compress HTML:

```
$minified_html = PHPWee\Minify::html($any_html);
```

This automatically compresses all inline scripts and stylesheets within the HTML document. Apply a 'data-no-min' attribute to a script or style to exclude it from minification.

How to compress CSS:

```
$minified_css = PHPWee\Minify::css($any_css);
```

How to compress JS:

```
$minified_js = PHPWee\Minify::js($any_js);
```

Spelling out out:

```
require_once ("phpwee-php-minifier/phpwee.php");

$html = file_get_contents("http://en.wikipedia.org/wiki/Minification_%28programming%29");
$minified_html = PHPWee\Minify::html($html);
// a 9.38% performance boost - in 3 lines of code!!
```

There are working examples in the /examples folder of the package.

PHPWee Performance
------------------

[](#phpwee-performance)

- The compression ratio are typically 5-20% for HTML
- The compression ratio are typically 5-30% for CSS
- The compression ratio are typically 5-30% for JavaScript

Even highly optimized sites such as wikipedia.com, github.com and W3Schools.com can reduce the size of their HTML payload using PHPWee html compression.

[![Performance Graph ](https://camo.githubusercontent.com/32a0b62d7683004067fc671e0fe64c9611f175c6972dd3995be1df3414159c8f/687474703a2f2f73656172636874757262696e652e636f6d2f6173736574732f7068707765652f7068707765652d706572666f726d6163652e706e67)](https://camo.githubusercontent.com/32a0b62d7683004067fc671e0fe64c9611f175c6972dd3995be1df3414159c8f/687474703a2f2f73656172636874757262696e652e636f6d2f6173736574732f7068707765652f7068707765652d706572666f726d6163652e706e67)

Who Makes PHPWee ?
------------------

[](#who-makes-phpwee-)

The PHPWee HTML compression technology is totally new. It actually parses HTML documents and removes unneeded spaces and verbosity without changing meaning in any way. The output is generally at least as W3C compliant as the input.

The Css compressor is built upon the CssMin package by Joe Scylla . The JavaScript compressor is built upon Douglas Crockford's JSMin.

PHPWee Purpose
--------------

[](#phpwee-purpose)

PHPWee is built and maintained by  as part of their 20% codeshare policy. They can be contacted at

PHPWee was designed as a pre-CDN optimizer for the searchturbine.com website - which is hosted on Github pages. It currently offers about 22% compression site-wide - and is used in the deployment process.

This technology would is ideally placed to be used in deployment scripts for websites, and would also fair wall as part of a CDN architecture.

PHPWee Improvements
-------------------

[](#phpwee-improvements)

- We are relatively new to Composer - and welcome input on package improvements.
- Removing default values from html tags should reduce HTML file size
- Allowing HTML fragments rather than whole documents would be ideal.

We "eat our own dog-food". We will be using this package to optimize  - and will publish all results, insights and improvements.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![ztkemsley](https://avatars.githubusercontent.com/u/11568784?v=4)](https://github.com/ztkemsley "ztkemsley (1 commits)")

### Embed Badge

![Health badge](/badges/searchturbine-phpwee-php-minifier/health.svg)

```
[![Health](https://phpackages.com/badges/searchturbine-phpwee-php-minifier/health.svg)](https://phpackages.com/packages/searchturbine-phpwee-php-minifier)
```

###  Alternatives

[mooore/magento2-module-wordpress-integration-cms

Magento 2 module for integrating Wordpress pages in Magento CMS pages.

1072.0k](/packages/mooore-magento2-module-wordpress-integration-cms)

PHPackages © 2026

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