MiscHelper
in package
Table of Contents
- dump_table() : string
- hexdump() : string|null
- View any string as a hexdump.
- methodSig() : string
- splitSecondsMicroseconds() : array<string|int, int>
- Gets a number (either int or float) and returns an array containing its integer part as first element and its decimal part mutliplied by 10^6. Useful for some PHP stream functions that need seconds and microseconds as different arguments
Methods
dump_table()
public
static dump_table(array<string|int, mixed> $table) : string
Parameters
- $table : array<string|int, mixed>
Return values
string —hexdump()
View any string as a hexdump.
public
static hexdump(string $data[, bool $htmloutput = true ][, bool $uppercase = false ][, bool $return = false ]) : string|null
This is most commonly used to view binary data from streams or sockets while debugging, but can be used to view any string with non-viewable characters.
Parameters
- $data : string
-
The string to be dumped
- $htmloutput : bool = true
-
Set to false for non-HTML output
- $uppercase : bool = false
-
Set to true for uppercase hex
- $return : bool = false
-
Set to true to return the dump
Tags
Return values
string|null —methodSig()
public
static methodSig(string|array<string|int, mixed> $a) : string
Parameters
- $a : string|array<string|int, mixed>
Return values
string —splitSecondsMicroseconds()
Gets a number (either int or float) and returns an array containing its integer part as first element and its decimal part mutliplied by 10^6. Useful for some PHP stream functions that need seconds and microseconds as different arguments
public
static splitSecondsMicroseconds(int|float $number) : array<string|int, int>
Parameters
- $number : int|float