POSIX_GETEGID(3) 1 POSIX_GETEGID(3)
posix_getegid - Return the effective group ID of the current process
SYNOPSIS
int posix_getegid (void )
DESCRIPTION
Return the numeric effective group ID of the current process.
RETURN VALUES
Returns an integer of the effective group ID.
EXAMPLES
Example #1
posix_getegid(3) example
This example will print out the effective group id, once it is changed with posix_setegid(3).
<?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
?>
NOTES
posix_getegid(3) is different than posix_getgid(3) because effective group ID can be changed by a calling process using posix_setegid(3).
SEE ALSO
posix_getgrgid(3), posix_getgid(3), posix_setgid(3).
PHP Documentation Group POSIX_GETEGID(3)