Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Uuid.php

function Uuid::compareTo

Overrides UuidInterface::compareTo

1 call to Uuid::compareTo()
Uuid::equals in vendor/ramsey/uuid/src/Uuid.php
Returns true if the UUID is equal to the provided object

File

vendor/ramsey/uuid/src/Uuid.php, line 343

Class

Uuid
Uuid provides constants and static methods for working with and generating UUIDs

Namespace

Ramsey\Uuid

Code

public function compareTo(UuidInterface $other) : int {
    $compare = strcmp($this->toString(), $other->toString());
    if ($compare < 0) {
        return -1;
    }
    if ($compare > 0) {
        return 1;
    }
    return 0;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal