Is there a better way to remove all other code except Function_ node using PHP Parser?

前端 未结 0 1832
小蘑菇
小蘑菇 2021-02-19 19:15

New to PHP here. I am using PHP-Parser by nikic.

I would like to remove all nodes that are not type Node\\Stmt\\Function_.

I currently can do this via

相关标签:
回答
  • 消灭零回复
提交回复
热议问题