Library/SymbolTable.php
public function hasVariable($name, CompilationContext $compilationContext = null)
    {
        return false !== $this->getVariable($name, $compilationContext ?: $this->compilationContext);
    }
public function hasVariable($name, CompilationContext $compilationContext = null)
    {
        return false !== $this->getVariable($name, $compilationContext ?: $this->compilationContext);
    }
public function hasVariable ( $ name , CompilationContext $ compilationContext = null ) { return false !== $ this -> getVariable ( $ name , $ compilationContext ? : $ this -> compilationContext ) ; }
Check if a variable is declared in the current symbol table.

@param string             $name
@param CompilationContext $compilationContext

@return bool
Check if a variable is declared in the current symbol table .