getmyuid

int getmyuid(void) 

Displays the UID of the current script.

Returns:

User ID; FALSE on error

Description:

This function returns the user ID (UID) of the user executing the PHP script. For users of Apache, this would be the user that Apache is running as. This and other related functions may not work correctly in the Win32 version of PHP.

Example:

Display script UID
// this does not work in Windows 
$uid = getmyuid(); 
echo $uid; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.