Documentation

NumberConverterInterface

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

Tags
psalm-immutable

Table of Contents

fromHex()  : string
Converts a hexadecimal number into an string integer representation of the number
toHex()  : string
Converts a string integer representation into a hexadecimal string representation of the number

Methods

fromHex()

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

public fromHex(string $hex) : string

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

Parameters
$hex : string

The hexadecimal string representation to convert

Tags
psalm-return

numeric-string

psalm-pure
Return values
string

String representation of an integer

toHex()

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

public toHex(string $number) : string
Parameters
$number : string

A string integer representation to convert; this must be a numeric string to accommodate unsigned integers greater than PHP_INT_MAX.

Tags
psalm-return

non-empty-string

psalm-pure
Return values
string

Hexadecimal string

Search results