Home > PHP > Function > POSIX > posix_setuid()

posix_setuid()

posix_setuid - Set the UID of the current process

Syntax

bool posix_setuid (int $uid)

Arguments

  • uid - The user id.

Description

Set the real user ID of the current process. This is a privileged function that needs appropriate privileges (usually root) on the system to be able to perform this function.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.