Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 5 Support #5

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add PHP 5 Support #5

wants to merge 8 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 5, 2021

Modified char_mapping to support PHP 5. Since PHP 5 is lack of IntlChar, this version can only convert ASCII characters perfectly. Plain mode can work well in PHP 5.However, since PHP 5 doesn't support ("function_name")() to call functions, I added a mode called assert5 which added some extra characters to support eval in PHP 5.I have also updated the README file.

@splitline
Copy link
Owner

Awesome, thanks! But I insist on using only ([+.^]) to accomplish this (I want to keep those generated code fuckful XD).

Anyway, don't worry. Recently I found that we can use things like this in PHP 5.6+ (since spread syntax only support newer version), so we don't need to use $_='assert';!

call_user_func(...["assert","eval('echo 1; return 1;')"]);

I'll try it later, or maybe you can help me to achive this 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant