https://github.com/czproject/phpshrink
Library for shrinking of PHP code.
https://github.com/czproject/phpshrink
Last synced: about 1 year ago
JSON representation
Library for shrinking of PHP code.
- Host: GitHub
- URL: https://github.com/czproject/phpshrink
- Owner: czproject
- Created: 2013-07-22T18:39:19.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T14:14:25.000Z (over 8 years ago)
- Last Synced: 2025-02-12T06:53:54.129Z (over 1 year ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
PHP Shrink
==========
Library for shrinking of PHP code.
Installation
------------
[Download a latest package](https://github.com/czproject/phpshrink/releases) or use [Composer](http://getcomposer.org/):
```
composer require czproject/phpshrink
```
PhpShrink requires PHP 5.3.0 or later.
Usage
-----
``` php
addFile('myfile.php');
$shrinker->addFile('libs.php');
// add array of files
$shrinker->addFiles(array(
'functions.php',
'exceptions.php',
));
// or add PHP code
$shrinker->addContent('getOutput();
```
------------------------------
Based on [class](https://github.com/nette/build-tools/blob/master/tasks/minify.php#L63) by [David Grudl](https://davidgrudl.com/).
David Grudl, https://davidgrudl.com/
Jan Pecha, https://www.janpecha.cz/