PHPSA\Compiler\Expression\Operators\Logical\LogicalXor::compile PHP Метод

compile() защищенный Метод

{expr} xor {expr}
protected compile ( PhpParser\Node\Expr\BinaryOp\LogicalXor $expr, Context $context ) : CompiledExpression
$expr PhpParser\Node\Expr\BinaryOp\LogicalXor
$context PHPSA\Context
Результат 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() xor $right->getValue());
        }
        return new CompiledExpression();
    }
LogicalXor