I have a question regarding a javascript code renderer made in php .. link
Can anyone help me understand how this guy did to generate?
I have a question regarding a javascript code renderer made in php .. link
Can anyone help me understand how this guy did to generate?
Today most projects with serious development in javascript end up doing this with nodejs and webpack as part of the build process.
With PHP, searching fast found this library, PHP-Packer .
Basically with it you pass the javascript code and it returns you the obfuscated code.
$js = file_get_contents('test.js');
$packer = new Tholu\Packer\Packer($js, 'Normal', true, false, true);
$packed_js = $packer->pack();
echo $packed_js;