+ 1
PHP rename all variables inside code
I would like to rename all variables within the file to random name. For example his: $example = 'some $string'; function ($variable2){ echo $variable2; } foreach($variable3 as $key => $var3val){ echo $var3val."somestring"; } will become this: $frk43r = 'some $string'; function ($izi34ee){ echo $izi34ee; } foreach($erew7er as $iure7 => $er3k2){ echo $er3k2."some$string"; } It doesn't look so easy task so any suggestions will be helpful.
1 ответ
- 1
I believe you're referring to code obfuscation. There should be a program out there that can do that automatically, but you could always just open the PHP file up in a good text editor and find/replace for each variable if there aren't too many...