phasync\Debug::binaryString() public static

Documentation

Format a binary string to be printable, for debugging binary protocols and other data. The characters that can be printed will be kept, while binary data will be enclosed in ⟪01FA6B⟫, and when the length

Signature

public static function binaryString(string $binary, bool $withLength = false): string

Parameters

NameTypeDefault
$binary string required
$withLength bool false

Returns

string

Source

src/Debug.php:23-37