PHPSA\Compiler\Expression\BinaryOp\NotEqual::compile PHP Method

compile() protected method

It's used in conditions {left-expr} != {right-expr}
protected compile ( PhpParser\Node\Expr\BinaryOp\NotEqual $expr, Context $context ) : CompiledExpression
$expr PhpParser\Node\Expr\BinaryOp\NotEqual
$context PHPSA\Context
return PHPSA\CompiledExpression
    protected function compile($expr, Context $context)
    {
        $left = $context->getExpressionCompiler()->compile($expr->left);
        $right = $context->getExpressionCompiler()->compile($expr->right);
        if ($left->isTypeKnown() && $right->isTypeKnown()) {
            return CompiledExpression::fromZvalValue($left->getValue() != $right->getValue());
        }
        return new CompiledExpression();
    }
NotEqual