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

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

php-code-minifier/php-code-minifier
===================================

PHP Code Minifier is a tool that allows you to minify your PHP code.

v1.2.3(1y ago)61.8k↓50%32MITPHPPHP ^8.0CI failing

Since Mar 26Pushed 1y ago3 watchersCompare

[ Source](https://github.com/alexandrmazur96/php-code-minifier)[ Packagist](https://packagist.org/packages/php-code-minifier/php-code-minifier)[ GitHub Sponsors](https://github.com/alexandrmazur96)[ RSS](/packages/php-code-minifier-php-code-minifier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (15)Used By (2)

PHP Code Minifier
=================

[](#php-code-minifier)

⭐ Star us on GitHub — it motivates us a lot! 😀

PHP Code Minifier is a tool that allows you to minify your PHP code. It removes all the unnecessary spaces and new lines from your PHP code and then split all the PHP code in the given `.php` file into one line.

I don't know why you would want to do this, but feel free to use it if you want to 😄

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

[](#installation)

You can install PHP Code Minifier using [Composer](https://getcomposer.org/):

```
composer require php-code-minifier/php-code-minifier
```

Usage
-----

[](#usage)

Keep in mind, PHP code inside short opening PHP tags (`
