array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.posix-setegid.php', 1 => 'posix_setegid', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'POSIX Funções', ), 'prev' => array ( 0 => 'function.posix-pathconf.php', 1 => 'posix_pathconf', ), 'next' => array ( 0 => 'function.posix-seteuid.php', 1 => 'posix_seteuid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/posix/functions/posix-setegid.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
posix_setegid — Set the effective GID of the current process
Set the effective group ID of the current process. This is a privileged function and needs appropriate privileges (usually root) on the system to be able to perform this function.
group_id
The group id.
Exemplo #1 posix_setegid() example
This example will print out the effective group id, once changed.
<?php
echo 'My real group id is '.posix_getgid(); //20
posix_setegid(40);
echo 'My real group id is '.posix_getgid(); //20
echo 'My effective group id is '.posix_getegid(); //40
?>