WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\RemoteInboxNotifications

ComparisonOperation::compare() public WC 1.0

Compare two operands using the specified operation.

{} It's a method of the class: ComparisonOperation{}

No Hooks.

Return

null. Nothing.

Usage

$result = ComparisonOperation::compare( $left_operand, $right_operand, $operation );
$left_operand(object) (required)
The left hand operand.
$right_operand(object) (required)
The right hand operand.
$operation(string) (required)
The operation used to compare the operands.

Code of ComparisonOperation::compare() WC 5.2.2

<?php
public static function compare( $left_operand, $right_operand, $operation ) {
	switch ( $operation ) {
		case '=':
			return $left_operand === $right_operand;
		case '<':
			return $left_operand < $right_operand;
		case '<=':
			return $left_operand <= $right_operand;
		case '>':
			return $left_operand > $right_operand;
		case '>=':
			return $left_operand >= $right_operand;
		case '!=':
			return $left_operand !== $right_operand;
		case 'contains':
			return in_array( $right_operand, $left_operand, true );
		case '!contains':
			return ! in_array( $right_operand, $left_operand, true );
	}

	return false;
}