Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $source = visitNode($source, function($node){
- if($node instanceof Namespace_) return NULL;
- return NodeTraverser::DONT_TRAVERSE_CHILDREN;
- }, function($node){
- if($node instanceof Name) return NULL; // this is the name of Namespace_
- if($node instanceof Namespace_) return NULL;
- if($node instanceof Declare_) return NULL;
- if($node instanceof Use_) return NULL;
- if($node instanceof Class_) return NULL;
- if($node instanceof Interface_) return NULL;
- if($node instanceof Function_) return NULL;
- return NodeTraverser::REMOVE_NODE;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement