Minify

Removes white-spaces and unused comments from CSS, HTML, and JavaScript files.

0 stars out of 5

0 0 0 0 0
  • Author Taufik Nurrohman
  • Maintainer 2
  • Member
  • Version 3.0.0
Table of Contents
  1. Usage
    1. CSS
    2. HTML
    3. JS
    4. JSON
    5. PHP
  2. Options

This extension reduces page size by removing unused white-spaces and comments from HTML output.

Usage

CSS

Minify::CSS(string $from, int $comment = 2, int $quote = 2): string;

HTML

Minify::HTML(string $from, int $comment = 2, int $quote = 1): string;

JS

Minify::JS(string $from, int $comment = 2, int $quote = 2): string;

JSON

Minify::JSON(string $from): string;

PHP

Minify::PHP(string $from, int $comment = 2): string;

Options

ParameterDescription
$fromThe input string to be minified.
$commentThe value of the $comment parameter consists of 0, 1, and 2. 0 means remove all comments, 1 means preserve all comments, 2 means remove all comments except special comments like IE conditional comments or license comments.
$quoteThe value of the $quote parameter is 1 or 2. 1 means to preserve all quotes, 2 means to remove quotes where possible. There is no such 0 option for $quote.

0 Comments

No comments yet.