Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
tholu committed Apr 19, 2016
1 parent 9906a9c commit b6f63a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ php-packer
==========

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

## Installation

Expand All @@ -21,18 +21,18 @@ $js = file_get_contents('test.js');
* $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.
* default: 62 ('Normal').
* $fastDecode: include the fast decoder in the packed result, boolean.
* default : true.
* $specialChars: if you are flagged your private and local variables
* 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 Packer($script, $encoding, $fastDecode, $specialChars, $removeSemicolons);
$packer = new Packer($js, 'Normal', true, true);
$packer = new Packer($js, 'Normal', true, false, true);
$packed_js = $packer->pack();
echo $packed_js;
```
4 changes: 2 additions & 2 deletions tests/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
require '../src/Packer.php';
error_reporting(E_ALL);
$js = file_get_contents(__DIR__ . '/' . 'test.js');
$packer = new Tholu\Packer\Packer($js, 'Normal', true, true);
$packer = new Tholu\Packer\Packer($js, 'Normal', true, false, true);
$packed_js = $packer->pack();
echo $packed_js; ?></script>
echo $packed_js; ?>;</script>

0 comments on commit b6f63a6

Please sign in to comment.