← All docs

exec()

Executes an external program and returns the last line of output.

exec()

function exec(string $command): string

Executes an external program and returns the last line of output.

Parameters:

  • $command (string)

Returns: string

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

Internals

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