php-doc-en/reference/posix/functions/posix-getgrgid.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

184 lines
4.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.posix-getgrgid" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>posix_getgrgid</refname>
<refpurpose>Return info about a group by group id</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>posix_getgrgid</methodname>
<methodparam><type>int</type><parameter>gid</parameter></methodparam>
</methodsynopsis>
<para>
Gets information about a group provided its id.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>gid</parameter></term>
<listitem>
<para>
The group id.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The array elements returned are:
<table>
<title>The group information array</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>name</entry>
<entry>
The name element contains the name of the group. This is
a short, usually less than 16 character "handle" of the
group, not the real, full name.
</entry>
</row>
<row>
<entry>passwd</entry>
<entry>
The passwd element contains the group's password in an
encrypted format. Often, for example on a system employing
"shadow" passwords, an asterisk is returned instead.
</entry>
</row>
<row>
<entry>gid</entry>
<entry>
Group ID, should be the same as the
<parameter>gid</parameter> parameter used when calling the
function, and hence redundant.
</entry>
</row>
<row>
<entry>members</entry>
<entry>
This consists of an <type>array</type> of
<type>string</type>'s for all the members in the group.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.2.0</entry>
<entry>
Prior to this version, members was simply an integer representing the
number of members in the group, and the member names were returned
with numerical indices.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example use of <function>posix_getgrgid</function></title>
<programlisting role="php">
<![CDATA[
<?php
$groupid = posix_getegid();
$groupinfo = posix_getgrgid($groupid);
print_r($groupinfo);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[name] => toons
[passwd] => x
[members] => Array
(
[0] => tom
[1] => jerry
)
[gid] => 42
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>posix_getegid</function></member>
<member><function>posix_getgrnam</function></member>
<member><function>filegroup</function></member>
<member><function>stat</function></member>
<member><link linkend="ini.safe-mode-gid">safe_mode_gid</link></member>
<member>POSIX man page GETGRNAM(3)</member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->