← All built-ins / getcwd()
getcwd()
getcwd(): string
Parameters
Takes no arguments.
Return value
The process's current working directory.
Example
echo strlen(getcwd()) > 0 ? "cwd-ok" : "cwd-empty";
cwd-ok
Takes no arguments.
The process's current working directory.
echo strlen(getcwd()) > 0 ? "cwd-ok" : "cwd-empty";
cwd-ok