← All docs

putenv()

Sets an environment variable, or removes it when the argument has no equals sign.

putenv()

function putenv(string $assignment): bool

Sets an environment variable, or removes it when the argument has no equals sign.

Parameters:

  • $assignment (string)

Returns: bool

Availability

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

Internals

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