array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.posix-getegid.php', 1 => 'posix_getegid', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'Fonctions POSIX', ), 'prev' => array ( 0 => 'function.posix-getcwd.php', 1 => 'posix_getcwd', ), 'next' => array ( 0 => 'function.posix-geteuid.php', 1 => 'posix_geteuid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'fr', 'path' => 'reference/posix/functions/posix-getegid.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
posix_getegid — Retourne l'ID effectif du groupe du processus courant
Cette fonction ne contient aucun paramètre.
Retourne un entier représentant l'ID effectif du groupe.
Exemple #1 Exemple avec posix_getegid()
Cet exemple affichera l'ID effectif du groupe, une fois modifié avec la fonction posix_setegid().
<?php
echo 'Mon ID réel de groupe est : '.posix_getgid(); //20
posix_setegid(40);
echo 'Mon ID réel de groupe est : '.posix_getgid(); //20
echo 'Mon ID effectif de groupe est : '.posix_getegid(); //40
?>
posix_getegid() est différent de posix_getgid() en le sens où l'identifiant effectif du groupe peut être changé par un appel à la fonction posix_setegid().