public static function parseSource($source, $filename = NULL) {
    static $tokenizer, $parser = NULL;
    if (!isset($parser)) {
      $tokenizer = new Tokenizer();
      $parser = new self();
    }
    $tokens = $tokenizer->getAll($source, $filename);
    $parser->filename = $filename;
    return $parser->buildTree(new TokenIterator($tokens));
  }
public static function parseSource($source, $filename = NULL) {
    static $tokenizer, $parser = NULL;
    if (!isset($parser)) {
      $tokenizer = new Tokenizer();
      $parser = new self();
    }
    $tokens = $tokenizer->getAll($source, $filename);
    $parser->filename = $filename;
    return $parser->buildTree(new TokenIterator($tokens));
  }
public static function parseSource ( $ source , $ filename = NULL ) { static $ tokenizer , $ parser = NULL ; if ( ! isset ( $ parser ) ) { $ tokenizer = new Tokenizer ( ) ; $ parser = new self ( ) ; } $ tokens = $ tokenizer -> getAll ( $ source , $ filename ) ; $ parser -> filename = $ filename ; return $ parser -> buildTree ( new TokenIterator ( $ tokens ) ) ; }
Parse PHP source code and return the parsed tree.

@param string $source
PHP source code
@param string $filename
(Optional) Filename of source.
@return RootNode
The top-level node of the parsed tree
Parse PHP source code and return the parsed tree .