← 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

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

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