public function leaveNode(Node $node)
    {
        if (self::isConditional($node)) {
            $this->conditionalScopes--;
        } elseif ($node instanceof FuncCall) {
            // if function name is an expression or a variable, give it a pass for now.
            $name = $node->name;
            if (!$name instanceof Expr && !$name instanceof Variable) {
                $shortName = \implode('\\', $name->parts);
                $fullName  = $this->getFullyQualifiedName($name);
                $inScope   = isset($this->currentScope[\strtolower($fullName)]);
                if (!$inScope && !\function_exists($shortName) && !\function_exists($fullName)) {
                    $message = \sprintf('Call to undefined function %s()', $name);
                    throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine());
                }
            }
        }
    }
public function leaveNode(Node $node)
    {
        if (self::isConditional($node)) {
            $this->conditionalScopes--;
        } elseif ($node instanceof FuncCall) {
            // if function name is an expression or a variable, give it a pass for now.
            $name = $node->name;
            if (!$name instanceof Expr && !$name instanceof Variable) {
                $shortName = \implode('\\', $name->parts);
                $fullName  = $this->getFullyQualifiedName($name);
                $inScope   = isset($this->currentScope[\strtolower($fullName)]);
                if (!$inScope && !\function_exists($shortName) && !\function_exists($fullName)) {
                    $message = \sprintf('Call to undefined function %s()', $name);
                    throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine());
                }
            }
        }
    }
public function leaveNode ( Node $ node ) { if ( self :: isConditional ( $ node ) ) { $ this -> conditionalScopes -- ; } elseif ( $ node instanceof FuncCall ) { // if function name is an expression or a variable, give it a pass for now. $ name = $ node -> name ; if ( ! $ name instanceof Expr && ! $ name instanceof Variable ) { $ shortName = \ implode ( '\\' , $ name -> parts ) ; $ fullName = $ this -> getFullyQualifiedName ( $ name ) ; $ inScope = isset ( $ this -> currentScope [ \ strtolower ( $ fullName ) ] ) ; if ( ! $ inScope && ! \ function_exists ( $ shortName ) && ! \ function_exists ( $ fullName ) ) { $ message = \ sprintf ( 'Call to undefined function %s()' , $ name ) ; throw new FatalErrorException ( $ message , 0 , E_ERROR , null , $ node -> getLine ( ) ) ; } } } }
Validate that function calls will succeed.

@throws FatalErrorException if a function is redefined
@throws FatalErrorException if the function name is a string (not an expression) and is not defined

@param Node $node
Validate that function calls will succeed .