DiscordPHP-Voice Documentation

FormatPackEnum : string
in package

Tags
link
https://www.php.net/manual/en/function.pack.php

Table of Contents

Cases

a  = 'a'
NUL-padded string.
A  = 'A'
SPACE-padded string.
At  = '@'
NUL-fill to absolute position.
c  = 'c'
signed char.
C  = 'C'
unsigned char.
d  = 'd'
double (machine dependent size and representation).
e  = 'e'
double (machine dependent size, little endian byte order).
E  = 'E'
double (machine dependent size, big endian byte order).
f  = 'f'
float (machine dependent size and representation).
g  = 'g'
float (machine dependent size, little endian byte order).
G  = 'G'
float (machine dependent size, big endian byte order).
h  = 'h'
Hex string, low nibble first.
H  = 'H'
Hex string, high nibble first.
i  = 'i'
signed integer (machine dependent size and byte order).
I  = 'I'
unsigned integer (machine dependent size and byte order).
J  = 'J'
unsigned long long (always 64 bit, big endian byte order).
l  = 'l'
signed long (always 32 bit, machine byte order).
L  = 'L'
unsigned long (always 32 bit, machine byte order).
n  = 'n'
unsigned short (always 16 bit, big endian byte order).
N  = 'N'
unsigned long (always 32 bit, big endian byte order).
P  = 'P'
unsigned long long (always 64 bit, little endian byte order).
q  = 'q'
signed long long (always 64 bit, machine byte order).
Q  = 'Q'
unsigned long long (always 64 bit, machine byte order).
s  = 's'
signed short (always 16 bit, machine byte order).
S  = 'S'
unsigned short (always 16 bit, machine byte order).
v  = 'v'
unsigned short (always 16 bit, little endian byte order).
V  = 'V'
unsigned long (always 32 bit, little endian byte order).
x  = 'x'
NUL byte.
X  = 'X'
Back up one byte.
Z  = 'Z'
NUL-padded string.

Methods

getLength()  : int
The fixed byte length of this format.

Cases

P

unsigned long long (always 64 bit, little endian byte order).

Methods

getLength()

The fixed byte length of this format.

public getLength() : int

Only defined for the fixed-width integer formats used by the byte buffer (n/v → 2, N/V → 4, c/C → 1); any other case throws.

Tags
throws
InvalidArgumentException

For a format with no fixed length.

Return values
int
On this page

Search results