posix_setuid

PHP 4, PHP 5, PHP 7, PHP 8
posix_setuid - Set the UID of the current process
Manual
Code Examples

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.

Related Functions

Example of posix_setuid

Show all examples for posix_setuid

PHP Version: