czproject/phpshrink

此软件包的最新版本(v1.0.0)没有提供许可证信息。

PHP代码压缩库。

v1.0.0 2013-07-23 10:04 UTC

This package is auto-updated.

Last update: 2024-09-14 07:02:28 UTC


README

PHP代码压缩库。

安装

下载最新版本包 或使用 Composer

composer require czproject/phpshrink

PhpShrink 需要 PHP 5.3.0 或更高版本。

用法

<?php
	$shrinker = new Cz\PhpShrink;

	// add files
	$shrinker->addFile('myfile.php');
	$shrinker->addFile('libs.php');

	// add array of files
	$shrinker->addFiles(array(
		'functions.php',
		'exceptions.php',
	));

	// or add PHP code
	$shrinker->addContent('<?php echo "hello!";');

	// get shrinked code
	$code = $shrinker->getOutput();

基于 David Grudl 提供。

David Grudl, https://davidgrudl.com/
Jan Pecha, https://www.janpecha.cz/