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

compile() protected method

It's used in conditions {left-expr} !== {right-expr}
protected compile ( PhpParser\Node\Expr\BinaryOp\NotIdentical $expr, Context $context ) : CompiledExpression
$expr PhpParser\Node\Expr\BinaryOp\NotIdentical
$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();
    }
NotIdentical