PHP code example of czproject / phpshrink

1. Go to this page and download the library: Download czproject/phpshrink library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

czproject / phpshrink example snippets

 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(' echo "hello!";');

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