← 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
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/network_env/putenv.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how putenv is implemented in the compiler, see the internals page.