← All docs

decbin()

Converts an integer to its binary string representation.

decbin()

function decbin(int $num): string

Converts an integer to its binary string representation.

Parameters:

  • $num (int)

Returns: string

Availability

  • Compiled (AOT): supported by the Elephc code generator.
  • eval() (magician interpreter): not available inside eval’d code.

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

Internals

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