z7zmey / php-parser

PHP parser written in Go

Home Page:https://php-parser.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Json string not valid

deenrookie opened this issue · comments

commented

When I parsed this with jsondumper

<?php
class A{
    function a($b){
        eval($b);
    }
}
class B{
function __construct(){
        $this->session = new A();
    }
}
class C extends B{
}

class C extends B{
}

The output not right.
But the site https://php-parser.com/ output is right. The site source code in open?

commented

I have solved it. astString = strings.Replace(astString, "}{", "},{", -1)