PHPSA\Compiler\Expression\Operators\Logical\BooleanNot::compile PHP Method

compile() protected method

!{expr}
protected compile ( PhpParser\Node\Expr\BooleanNot $expr, Context $context ) : CompiledExpression
$expr PhpParser\Node\Expr\BooleanNot
$context PHPSA\Context
return PHPSA\CompiledExpression
    protected function compile($expr, Context $context)
    {
        $compiledExpression = $context->getExpressionCompiler()->compile($expr->expr);
        if ($compiledExpression->isTypeKnown()) {
            return CompiledExpression::fromZvalValue(!$compiledExpression->getValue());
        }
        return new CompiledExpression();
    }
BooleanNot