posix_setuid
PHP 4, PHP 5, PHP 7, PHP 8
posix_setuid - Set the UID of the current process
Manual
posix_setuid(
int$user_id ): bool
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.
Parameters
- user_id
-
The user id.
Return Values
Returns true on success or false on failure.