{"id":21216877,"url":"https://github.com/lablnet/php-minify","last_synced_at":"2025-07-10T11:33:00.059Z","repository":{"id":53978191,"uuid":"142247818","full_name":"lablnet/PHP-Minify","owner":"lablnet","description":"Minify your code commpress the size, increased speed","archived":false,"fork":false,"pushed_at":"2020-02-23T10:50:40.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-21T23:48:32.348Z","etag":null,"topics":["classes","compresed","free","html","master","minify","oop","php","reduce"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lablnet.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T04:34:01.000Z","updated_at":"2022-08-06T14:52:06.000Z","dependencies_parsed_at":"2022-08-13T05:40:21.401Z","dependency_job_id":null,"html_url":"https://github.com/lablnet/PHP-Minify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Minify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Minify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Minify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Minify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lablnet","download_url":"https://codeload.github.com/lablnet/PHP-Minify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225637088,"owners_count":17500360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classes","compresed","free","html","master","minify","oop","php","reduce"],"created_at":"2024-11-20T21:56:07.681Z","updated_at":"2024-11-20T21:56:08.339Z","avatar_url":"https://github.com/lablnet.png","language":"PHP","readme":"# PHP Minify\nMinify your code with php\n\n## Requirement\n1. PHP 7 (7.3 Recommanded).\n2. Composer.\n\n## Insallation\nInstalling this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:\n``` composer require lablnet/minify```\n\n## Feature\n-   Minify HTML\n-   Minify CSS\n-   Minify JavaScript\n\n## Example\n```php\n\u003c?php\n# index.php\n\nrequire_once '../vendor/autoload.php';\n\n$minify = new Minify();\n$file = $minify-\u003ehtmlMinify('test.html');\n$file = $minify-\u003ecssMinify(\"test.html\");\n$file = $minify-\u003ejavascriptMinify(\"test.html\");\n\nvar_dump($file);\n```\n```test.html```\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003ctitle\u003eIm not mainfied\u003c/title\u003e\n\t\u003cstyle type=\"text/css\"\u003e\n\t/*im comments in css block */\n\t\tbody {\n\t\t\tbackground-color: black;\n\t\t\tcolor: white;\n\t\t\t/*display: inline-flex;*/\n\t\t}\n\t\u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003ch1\u003eIm heading\u003c/h1\u003e\n\t\u003cp\u003eIm paragraph\u003c/p\u003e\n\t\u003cp id='demo'\u003e\u003c/p\u003e\n\t\u003c!-- Im html comments  --\u003e\n\u003c/body\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\t/* im script */\n\tdocument.getElementById('demo').innerHTML = 'Hello JavaScript';\n\u003c/script\u003e\n\u003c/html\u003e\n```\n\n## Methods\n\n- `htmlMinify($file, $type)` Minify HTML code, `$file` file path or code, `$type` supported, file, code.\n- `cssMinify($file, $type)` Minify CSS code, `$file` file path or code, `$type` supported, file, code.\n- `javascriptMinify($file, $type)` Minify JS code, `$file` file path or code, `$type` supported, file, code.\n\n## Contributions  \nThere is still a lot of work to do, so feel free to contribute to open `PR`  \n  \n## License  \nMIT  \n  \n## Support  \nDonate coffee?  \nhere is the bitcoin address  \n[![Balance](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)\n\n   ```37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV```  \n  \nThanks you so much.\n\n## Disclaimer\n**I don't Accept any responsibility for any illegal usage**","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-minify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flablnet%2Fphp-minify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-minify/lists"}