pk-fr / yakpro-po

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

Use keyword is not processed correctly #7

Closed mologie closed 8 years ago

mologie commented 8 years ago

Test case:

<?php
use FooNamespace\BarClass;
BarClass::fooMethod();

Example output:

<?php
 use Ursex\edPAQ as eDpAq; lhk21::n0Qum();

I would have expected the obfuscator to emit eDpAq::n0Qum(); as function call instead. Some implementation for aliasing classes appears to be there already since an 'as' is appended to the 'use' statement, but it doesn't do the right thing just yet.

pk-fr commented 8 years ago

Hi Oliver,

in the new 1.8.0 release, namespaces and classes are now sharing the same obfuscation context in order to be alias compliant.

mologie commented 8 years ago

Thanks for the three quick fixes, use and constants work properly now.