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

想请教下你是如何预处理php代码的 #1

Open
for-just-we opened this issue Feb 1, 2021 · 1 comment
Open

想请教下你是如何预处理php代码的 #1

for-just-we opened this issue Feb 1, 2021 · 1 comment

Comments

@for-just-we
Copy link

比如下面这个php代码

<?php
class Test
{
    public function __toString()
    {
        $method='sysatem';
        (substr($method,0,3).substr($method, 4))($_GET['arg']);
        return '1';
    }
}
$a=new Test();
echo $a;
?>

一般都需要把php代码转化成一个序列

想问下你是用正则表达式来切分php代码,还是用了源代码解析库(比如antlr)

@lyccol
Copy link
Owner

lyccol commented Feb 1, 2021 via email

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

No branches or pull requests

2 participants