pk-fr / yakpro-po

YAK Pro - Php Obfuscator
http://www.php-obfuscator.com
Other
1.27k stars 354 forks source link

Facing issue with get_class_methods() function #48

Closed shukla-rohit closed 4 years ago

shukla-rohit commented 4 years ago

Hello,

I am facing issue after converting code for bench mark script. Its not working fine. http://www.php-benchmark-script.com/ file: http://www.php-benchmark-script.com/download.php?file=bench.zip

pk-fr commented 4 years ago

Refer to "Hints for preparing your Software to be run obfuscated" section of readme.md...

If you obfuscate functions, do not use indirect function calls like $my_var = 'my_function'; $my_var(); or put all the function names you call indirectly in the $conf->t_ignore_functions array!

the following part of the code does not respect this :

    foreach ($functions['user'] as $user) {
        if (preg_match('/^test_/', $user)) {
            $total += $result = $user();
            echo str_pad($user, 25) . " : " . $result ." sec.\n";
        }
    }

$user() is an indirect call... if (pregmatch('/^test/', $user)) is never true because function name is obfuscated.... use the --no-obfuscate-function-name option!