<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.posix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.posix-getgrnam.php',
    1 => 'posix_getgrnam',
    2 => 'Возвращает информацию о группе, используя её имя',
  ),
  'up' => 
  array (
    0 => 'ref.posix.php',
    1 => 'Функции модуля POSIX',
  ),
  'prev' => 
  array (
    0 => 'function.posix-getgrgid.php',
    1 => 'posix_getgrgid',
  ),
  'next' => 
  array (
    0 => 'function.posix-getgroups.php',
    1 => 'posix_getgroups',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/posix/functions/posix-getgrnam.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.posix-getgrnam" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_getgrnam</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">posix_getgrnam</span> &mdash; <span class="dc-title">Возвращает информацию о группе, используя её имя</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.posix-getgrnam-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>posix_getgrnam</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Возвращает информацию о группе, используя её имя.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.posix-getgrnam-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">Имя группы</p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-getgrnam-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает массив (<span class="type"><a href="language.types.array.php" class="type array">array</a></span>) в случае успешного выполнения или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибка.
   Возвращаемый массив имеет следующие элементы:
   <table class="doctable table">
    <caption><strong>Массив с информацией о группе</strong></caption>
    
     <thead>
      <tr>
       <th>Элемент</th>
       <th>Описание</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>name</td>
       <td>
        Элемент name содержит имя группы. Это короткий, обычно
        менее 16 символов &quot;дескриптор&quot; группы, не являющийся действительным
        полным именем группы. Он должен соответствовать <code class="parameter">name</code>
        параметру, используемому в данной функции. Элемент является избыточным.
       </td>
      </tr>

      <tr>
       <td>passwd</td>
       <td>
        Элемент passwd содержит пароль группы в зашифрованном виде.
        Часто, например в системах, использующих &quot;shadow&quot; файлы для хранения информации о паролях,
        это поле содержит звёздочку.
       </td>
      </tr>

      <tr>
       <td>gid</td>
       <td>
        Идентификатор группы, состоящий из цифр.
       </td>
      </tr>

      <tr>
       <td>members</td>
       <td>
        Этот элемент состоит из <span class="type"><a href="language.types.array.php" class="type array">array</a></span>, содержащего <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
        Значениями данного массива являются имена членов данной группы.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.posix-getgrnam-examples">
  <h3 class="title">Примеры</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Пример #1 Пример использования <span class="function"><strong>posix_getgrnam()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$groupinfo </span><span style="color: #007700">= </span><span style="color: #0000BB">posix_getgrnam</span><span style="color: #007700">(</span><span style="color: #DD0000">"toons"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$groupinfo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    
<div class="example-contents"><p>
 Вывод приведённого примера будет похож на:
</p></div>

    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [name]    =&gt; toons
    [passwd]  =&gt; x
    [members] =&gt; Array
        (
            [0] =&gt; tom
            [1] =&gt; jerry
        )
    [gid]     =&gt; 42
)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.posix-getgrnam-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.posix-getegid.php" class="function" rel="rdfs-seeAlso">posix_getegid()</a> - Возвращает эффективный идентификатор группы текущего процесса EGID</span></li>
    <li><span class="function"><a href="function.posix-getgrgid.php" class="function" rel="rdfs-seeAlso">posix_getgrgid()</a> - Возвращает информацию о группе по её ID</span></li>
    <li><span class="function"><a href="function.filegroup.php" class="function" rel="rdfs-seeAlso">filegroup()</a> - Получает идентификатор группы файла</span></li>
    <li><span class="function"><a href="function.stat.php" class="function" rel="rdfs-seeAlso">stat()</a> - Возвращает информацию о файле</span></li>
    <li>POSIX руководство GETGRNAM(3)</li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>