mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146503 c90b9560-bf6c-de11-be94-00142212c4b1
92 lines
2.3 KiB
XML
92 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- splitted from ./en/functions/posix.xml, last change in rev 1.2 -->
|
|
<refentry id="function.posix-getgrgid">
|
|
<refnamediv>
|
|
<refname>posix_getgrgid</refname>
|
|
<refpurpose>Return info about a group by group id</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>posix_getgrgid</methodname>
|
|
<methodparam><type>int</type><parameter>gid</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
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);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
An example output:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[name] => toons
|
|
[passwd] => x
|
|
[members] => Array
|
|
(
|
|
[0] => tom
|
|
[1] => jerry
|
|
)
|
|
[gid] => 42
|
|
)
|
|
]]>
|
|
</screen>
|
|
</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>
|
|
|
|
<!-- 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
|
|
-->
|