pk-fr / yakpro-po

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

Scrambled labels might match reserved words #39

Closed biziclop closed 5 years ago

biziclop commented 5 years ago

Hi, thanks for the nice project! :)

I set $conf->scramble_length = 2; to make things smaller (and I'm just experimenting anyways), but PHP complained:
PHP Parse error: syntax error, unexpected 'aS' (T_AS), expecting identifier (T_STRING)

This was the show-stopping expression:
goto aS;

While $-prefixed variable names are not affected, labels, class names, constants, etc. won't really like if they are renamed for reserved words.

Maybe a reserved word list should be included ( http://php.net/reserved )?

pk-fr commented 5 years ago

Hi, thanks for reporting the bug...

case sensitive elements were incorrectly tested against reserved tokens. ( "As" was tested as "As" not as "as" )

fixed in version 2.0.3