posix_getgid

Return the real group ID of the current process

&reftitle.description; `int` `posix_getgid`

Return the numeric real group ID of the current process.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

Returns the real group id, as an `int`.

&reftitle.examples;

### `posix_getgid` example

This example will print out the real group id, even once the effective group id has been 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
    ?>

&reftitle.seealso;

- `posix_getgrgid`
- `posix_getegid`
- `posix_setgid`
- POSIX man page GETGID(2)