Sets an environment variable to a value.
To unset or clear an environment variable, see unsetenv().
int setenv(string $var, softstring $value)
setenv("PATH", "/bin:/usr/bin");
Table 3.100. Arguments and Return Values for setenv()
Argument Type | Return Type | Description |
|---|---|---|
| Sets the environment variable to a string value (the value is converted to a string if necessary). |
This function does not throw any exceptions.