cvs: phpdoc /en/reference/posix/functions posix-getgrgid.xml
| From: | Philip Olson | Date: | Fri, 25 Apr 2003 21:44:26 +0000 |
| Subject: | cvs: phpdoc /en/reference/posix/functions posix-getgrgid.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352883@lists.php.net to get a copy of this message | ||
philip Fri Apr 25 17:44:26 2003 EDT
Modified files:
/phpdoc/en/reference/posix/functions posix-getgrgid.xml
Log:
Initial documentation which includes a 4.2.0+ example, information on behavior
before 4.2.0, and related see also's.
Index: phpdoc/en/reference/posix/functions/posix-getgrgid.xml
diff -u phpdoc/en/reference/posix/functions/posix-getgrgid.xml:1.3
phpdoc/en/reference/posix/functions/posix-getgrgid.xml:1.4
--- phpdoc/en/reference/posix/functions/posix-getgrgid.xml:1.3 Mon Jan 27 22:16:51 2003
+++ phpdoc/en/reference/posix/functions/posix-getgrgid.xml Fri Apr 25 17:44:26 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/posix.xml, last change in rev 1.2 -->
<refentry id="function.posix-getgrgid">
<refnamediv>
@@ -13,7 +13,56 @@
<methodparam><type>int</type><parameter>gid</parameter></methodparam>
</methodsynopsis>
<para>
- &warn.undocumented.func;
+ Returns an <type>array</type> of information about a group and
+ &false; on failure. If <parameter>gid</parameter> isn't a number
+ then &null; is returned and an <constant>E_WARNING</constant>
+ level error is generated.
+ </para>
+ <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);
+
+/* An example output:
+
+Array
+(
+ [name] => toons
+ [passwd] => x
+ [members] => Array
+ (
+ [0] => tom
+ [1] => jerry
+ )
+ [gid] => 42
+)
+
+*/
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <note>
+ <para>
+ As of PHP 4.2.0, members is returned as an array of member
+ usernames in the group. Before this time it was simply an
+ integer (the number of members in the group) and the member
+ names were returned with numerical indices.
+ </para>
+ </note>
+ <para>
+ See also <function>posix_getegid</function>,
+ <function>filegroup</function>,
+ <function>stat</function>, and
+ <link linkend="ini.safe-mode-gid">safe_mode_gid</link>.
</para>
</refsect1>
</refentry>