2017 © Pedro Peláez
 

library php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

image

tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  • Wednesday, October 18, 2017
  • by tholu
  • Repository
  • 8 Watchers
  • 76 Stars
  • 35,579 Installations
  • PHP
  • 3 Dependents
  • 1 Suggesters
  • 28 Forks
  • 0 Open issues
  • 8 Versions
  • 16 % Grown

The README.md

php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards, ported to PHP by Nicolas Martin. Packed for composer and slightly extended by Thomas Lutz., (*1)

Installation

Simply run composer require tholu/php-packer., (*2)

Usage (slightly changed from previous used implementation!)

<?php
require 'vendor/autoload.php';

$js = file_get_contents('test.js');

/*
 * params of the constructor :
 * $script:           the JavaScript to pack, string.
 * $encoding:         level of encoding, int or string :
 *                    0,10,62,95 or 'None', 'Numeric', 'Normal', 'High ASCII'.
 *                    default: 62 ('Normal').
 * $fastDecode:       include the fast decoder in the packed result, boolean.
 *                    default: true.
 * $specialChars:     if you have flagged your private and local variables
 *                    in the script, boolean.
 *                    default: false.
 * $removeSemicolons: whether to remove semicolons from the source script.
 *                    default: true.
 */

// $packer = new Tholu\Packer\Packer($script, $encoding, $fastDecode, $specialChars, $removeSemicolons);
$packer = new Tholu\Packer\Packer($js, 'Normal', true, false, true);
$packed_js = $packer->pack();
echo $packed_js;

UTF8

If you have UTF8 characters in your JavaScript like here, avoid using the "High ASCII" encoding and use "Normal" instead. Also make sure, that the file is saved and read with proper UTF8 encoding., (*3)

The Versions

18/10 2017

dev-master

9999999-dev https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nicolas Martin
by Dean Edwards

javascript js minify obfuscate uglify minification

19/04 2016

0.2.0

0.2.0.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nicolas Martin
by Dean Edwards

javascript js minify obfuscate uglify minification

18/11 2015

0.1.2

0.1.2.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nicolas Martin
by Dean Edwards

javascript js minify obfuscate uglify minification

05/01 2015

0.1.1

0.1.1.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nicolas Martin
by Dean Edwards

javascript js minify obfuscate uglify minification

05/01 2015

0.1.0

0.1.0.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nicolas Martin
by Dean Edwards

javascript js minify obfuscate uglify minification

05/11 2014

0.0.3

0.0.3.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

javascript js minify obfuscate uglify minification

05/11 2014

0.0.2

0.0.2.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

javascript js minify obfuscate uglify minification

05/11 2014

0.0.1

0.0.1.0 https://github.com/tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

javascript js minify obfuscate uglify minification