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

Breadcrumb

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

function NumberConverterInterface::fromHex

Converts a hexadecimal number into an string integer representation of the number

The integer representation returned is a string representation of the integer, to accommodate unsigned integers greater than PHP_INT_MAX.

@psalm-return numeric-string

@psalm-pure

Parameters

string $hex The hexadecimal string representation to convert:

Return value

string String representation of an integer

2 methods override NumberConverterInterface::fromHex()
BigNumberConverter::fromHex in vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php
@inheritDoc @psalm-pure
GenericNumberConverter::fromHex in vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php
@inheritDoc @psalm-pure @psalm-return numeric-string @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty

File

vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php, line 40

Class

NumberConverterInterface
A number converter converts UUIDs from hexadecimal characters into representations of integers and vice versa

Namespace

Ramsey\Uuid\Converter

Code

public function fromHex(string $hex) : string;

API Navigation

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