downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.msg-stat-queue.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.sem.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.msg-stat-queue.php',
   
1 => 'msg_stat_queue',
  ),
 
'up' =>
  array (
   
0 => 'ref.sem.php',
   
1 => 'Semaphore Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.msg-set-queue.php',
   
1 => 'msg_set_queue',
  ),
 
'next' =>
  array (
   
0 => 'function.sem-acquire.php',
   
1 => 'sem_acquire',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.msg-stat-queue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">msg_stat_queue</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">msg_stat_queue</span> &mdash; <span class="dc-title">Returns information from the message queue data structure</span></p>

 </div>
 
 <a name="function.msg-stat-queue.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><b>msg_stat_queue</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$queue</tt></span>
   )</div>

  <p class="para rdfs-comment">
   <b>msg_stat_queue()</b> returns the message queue meta data
   for the message queue specified by the <i><tt class="parameter">queue</tt></i>
.
   This is useful, for example, to determine which process sent the message
   that was just received.
  </p>
 </div>


 <a name="function.msg-stat-queue.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">queue</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Message queue resource handle
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.msg-stat-queue.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   The return value is an array whose keys and values have the following
   meanings:
   </p><table class="doctable table">
    <caption><b>Array structure for msg_stat_queue</b></caption>
   
     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left"><i>msg_perm.uid</i></td>
       <td align="left">
        The uid of the owner of the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_perm.gid</i></td>
       <td align="left">
        The gid of the owner of the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_perm.mode</i></td>
       <td align="left">
        The file access mode of the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_stime</i></td>
       <td align="left">
        The time that the last message was sent to the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_rtime</i></td>
       <td align="left">
        The time that the last message was received from the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_ctime</i></td>
       <td align="left">
        The time that the queue was last changed.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_qnum</i></td>
       <td align="left">
        The number of messages waiting to be read from the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_qbytes</i></td>
       <td align="left">
        The maximum number of bytes allowed in one message queue. On
        Linux, this value may be read and modified via
        <var class="filename">/proc/sys/kernel/msgmnb</var>.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_lspid</i></td>
       <td align="left">
        The pid of the process that sent the last message to the queue.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left"><i>msg_lrpid</i></td>
       <td align="left">
        The pid of the process that received the last message from the queue.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>


 <a name="function.msg-stat-queue.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.msg-remove-queue.php" class="function" rel="rdfs-seeAlso">msg_remove_queue()</a> - Destroy a message queue</li>
    <li class="member"><a href="function.msg-receive.php" class="function" rel="rdfs-seeAlso">msg_receive()</a> - Receive a message from a message queue</li>
    <li class="member"><a href="function.msg-get-queue.php" class="function" rel="rdfs-seeAlso">msg_get_queue()</a> - Create or attach to a message queue</li>
    <li class="member"><a href="function.msg-set-queue.php" class="function" rel="rdfs-seeAlso">msg_set_queue()</a> - Set information in the message queue data structure</li>
   </ul><p>
  </p>
 </div>
 

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites