posix_getlogin
PHP function
Edit on GitHub ✎
(PHP 4, PHP 5, PHP 7, PHP 8)
Return login name
Description
posix_getlogin(): string|false
Returns the login name of the user owning the current process.
Parameters Parameters
Return Values
Returns the login name of the user, as a string, Falseforfailure.
Examples
Example use of posix_getlogin()
php
<?php
echo posix_getlogin(); //apache
?>See Also
posix_getpwnam()- POSIX man page GETLOGIN(3)