array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.posix-geteuid.php', 1 => 'posix_geteuid', 2 => 'Return the effective user ID of the current process', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'POSIX 函数', ), 'prev' => array ( 0 => 'function.posix-getegid.php', 1 => 'posix_getegid', ), 'next' => array ( 0 => 'function.posix-getgid.php', 1 => 'posix_getgid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/posix/functions/posix-geteuid.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
posix_geteuid — Return the effective user ID of the current process
Return the numeric effective user ID of the current process. See also posix_getpwuid() for information on how to convert this into a useable username.
此函数没有参数。
Returns the user id, as an int
示例 #1 posix_geteuid() example
This example will show the current user id then set the effective user id to a separate id using posix_seteuid(), then show the difference between the real id and the effective id.
<?php
echo posix_getuid()."\n"; //10001
echo posix_geteuid()."\n"; //10001
posix_seteuid(10000);
echo posix_getuid()."\n"; //10001
echo posix_geteuid()."\n"; //10000
?>