You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that is, you have a class method with the same name as the class. Prior to PHP 5.x, this was the standard way to define the class constructor - today we would use __construct(). If you have class and method obfuscation turned on, then class x will be renamed to a different name than its constructor method x(). Thus, x() will cease to be a constructor in the obfuscated program, as its new name will not match the new class name.
I consider this a bug, because using class-named methods as constructors does not throw any error in PHP 7.x. So if you want to be thorough, this should be corrected.
One could argue, of course, that we can (or should) ignore such method and class names for both class and method obfuscation. This is true, but it is a PITA if you have thousands of files.
Besides, it is a very nasty bug, because it took me two days to find out what is going on, namely that the constructor was not being executed, because it ceased being a constructor in the obfuscated script! 😱
The text was updated successfully, but these errors were encountered:
Suppose you have
that is, you have a class method with the same name as the class. Prior to PHP 5.x, this was the standard way to define the class constructor - today we would use __construct(). If you have class and method obfuscation turned on, then class x will be renamed to a different name than its constructor method x(). Thus, x() will cease to be a constructor in the obfuscated program, as its new name will not match the new class name.
I consider this a bug, because using class-named methods as constructors does not throw any error in PHP 7.x. So if you want to be thorough, this should be corrected.
One could argue, of course, that we can (or should) ignore such method and class names for both class and method obfuscation. This is true, but it is a PITA if you have thousands of files.
Besides, it is a very nasty bug, because it took me two days to find out what is going on, namely that the constructor was not being executed, because it ceased being a constructor in the obfuscated script! 😱
The text was updated successfully, but these errors were encountered: