← All docs

bin2hex()

Converts binary data into its hexadecimal string representation.

bin2hex()

function bin2hex(string $string): string

Converts binary data into its hexadecimal string representation.

Parameters:

  • $string (string)

Returns: string

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how bin2hex is implemented in the compiler, see the internals page.