PHPackages                             marko9827/phpminify - 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. marko9827/phpminify

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

marko9827/phpminify
===================

Minify JS, CSS, HTML string or file

01[1 issues](https://github.com/Marko9827/Phpminify/issues)[1 PRs](https://github.com/Marko9827/Phpminify/pulls)PHP

Since Dec 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Marko9827/Phpminify)[ Packagist](https://packagist.org/packages/marko9827/phpminify)[ RSS](/packages/marko9827-phpminify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (2)Used By (0)

Phpminify
=========

[](#phpminify)

Minify JS, CSS, HTML string or file.

[![CI](https://github.com/Marko9827/Phpminify/actions/workflows/blank.yml/badge.svg?branch=main)](https://github.com/Marko9827/Phpminify/actions/workflows/blank.yml)

[![PHP Composer](https://github.com/Marko9827/Phpminify/actions/workflows/php.yml/badge.svg)](https://github.com/Marko9827/Phpminify/actions/workflows/php.yml)

> Very simple. Use this code.

Composer
========

[](#composer)

1. Install composer
2. Type `composer require marko9827/minify`
3. Enjoy

Usage
=====

[](#usage)

```
 use marko9827\minify\Minify as MinifyMinify;

 $content = file_get_contents("$path/file.example"); // .example = .js/.css/.html
 // or
 $content = "var a = 0;  return a + 2;"; //js example
 $content = "body { display: flex; }"; // css example
 $content = "...  Html Example  ..."; // html example

 $minify = new Minify($content);
 echo $minify;
 // or
 echo new Minify($content);
```

Return minified content

> Valid file extensions or MimeTypes

ExtensionMimeTypejs / jsontext/javascriptjs / jsonapplication/javascriptcsstext/stylecsstext/csshtmltext/html

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/782aa224ca81c476a3be0d1ee2038097ad0f050a42eeab9f7aea3b5cee4027de?d=identicon)[Marko9827](/maintainers/Marko9827)

---

Top Contributors

[![Marko9827](https://avatars.githubusercontent.com/u/8102151?v=4)](https://github.com/Marko9827 "Marko9827 (32 commits)")

---

Tags

composercomposer-packagelaravellaravel-packageminify-cssminify-htmlminify-javascriptminify-jsonpackagephp

### Embed Badge

![Health badge](/badges/marko9827-phpminify/health.svg)

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

PHPackages © 2026

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