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
Hi,
Thank you for this great project! I use it to deobfuscate some PHP code. I have recently tried with a valid PHP code that cannot be parsed by phply. Here is the code:
<?php
function foo($value) {
echo $value;
}
foo(0987654321);
It seems that when an invalid octal variablle is passed to PHP, is value is modified to 0. Things that phply does not handle.
The text was updated successfully, but these errors were encountered:
Thanks for the patch @y0no !
It seems that new versions of php (>=7) turn invalid octal numbers into a syntax error, so there's no good way to seamlessly support both "correct" behaviours.
One way I see that could potentially fix this is to basically have a v5/v7 switch, but that would essentially require 2 separate parsers. I'd rather support the current version properly.
Alternatively there could be relaxed/strict mode if there are enough edge cases for it.
Hi,
Thank you for this great project! I use it to deobfuscate some PHP code. I have recently tried with a valid PHP code that cannot be parsed by phply. Here is the code:
It seems that when an invalid octal variablle is passed to PHP, is value is modified to 0. Things that phply does not handle.
The text was updated successfully, but these errors were encountered: