improvement: Ignore variable names beginning by ...
Opened this issue · 3 comments
pk-fr commented
In my project, I work with indirect function names or variable names.... ( i.e. $$v = 'xxx')
they all start with a prefix .
is it possible to add a joker in
obfuscator.scramble_variable.ignore: (and obfuscator.scramble_private_method.ignore:)
- foo*
meaning variable (or function) starting by foo
pk-fr commented
I have started looking at your code....
perhaps could be optimized :
- using 2 arrays : 1 for ignore, and 1 for ignore_starting_with...
- using array_keys instead of values ( isset is far more efficient than in_array, when hundreeds of variables are to be ignored)
naneau commented
Perhaps a regular expression for variable names could be implemented, it would solve this problem. In general, however, you'll find that variable variables will cause problems with this kind of obfuscation.
pk-fr commented
It would be great :)