I’m searching for a javascript obfuscator. Though I’ve found many obfuscators, no one so far seems to be able to handle (ie ignore) inline php code. Example of what I mean by inline php code:
var my_javascript_variable = <?php echo $my_php_variable; ?>;
Is this possible to obuscate, and if so, does anyone know of such a tool?
Not aware of any obfuscator capable of doing this, but you could simply make your JavaScript code reference a Config Object instead of the PHP code. Then you can obfuscate the main JavaScript code, e.g.