<HTML ><HEAD ><TITLE >msg_stat_queue</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Semaphore, Shared Memory and IPC Functions" HREF="ref.sem.html"><LINK REL="PREVIOUS" TITLE="msg_set_queue" HREF="function.msg-set-queue.html"><LINK REL="NEXT" TITLE="sem_acquire" HREF="function.sem-acquire.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.msg-set-queue.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.sem-acquire.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.msg-stat-queue" ></A >msg_stat_queue</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN82540" ></A ><P > (PHP 4 >= 4.3.0)</P >msg_stat_queue -- Returns information from the message queue data structure </DIV ><DIV CLASS="refsect1" ><A NAME="AEN82543" ></A ><H2 >Description</H2 >array <B CLASS="methodname" >msg_stat_queue</B > ( int queue)<BR ></BR ><P > <B CLASS="function" >msg_stat_queue()</B > returns the message queue meta data for the message queue specified by the <TT CLASS="parameter" ><I >queue</I ></TT >. This is useful, for example, to determine which process sent the message that was just received. </P ><P > The return value is an array whose keys and values have the following meanings: <DIV CLASS="table" ><A NAME="AEN82555" ></A ><P ><B >Table 1. Array structure for msg_stat_queue</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_perm.uid</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The uid of the owner of the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_perm.gid</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The gid of the owner of the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_perm.mode</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The file access mode of the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_stime</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The time that the last message was sent to the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_rtime</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The time that the last message was received from the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_ctime</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The time that the queue was last changed. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_qnum</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The number of messages waiting to be read from the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_qbytes</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The number of bytes of space currently available in the queue to hold sent messages until they are received. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_lspid</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The pid of the process that sent the last message to the queue. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >msg_lrpid</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > The pid of the process that received the last message from the queue. </TD ></TR ></TBODY ></TABLE ></DIV > </P ><P > See also: <A HREF="function.msg-remove-queue.html" ><B CLASS="function" >msg_remove_queue()</B ></A >, <A HREF="function.msg-receive.html" ><B CLASS="function" >msg_receive()</B ></A >, <B CLASS="function" >msg_stat_queue()</B > and <A HREF="function.msg-set-queue.html" ><B CLASS="function" >msg_set_queue()</B ></A >. </P ><P > This function was introduced in PHP 4.3.0 (not yet released). </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.msg-set-queue.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sem-acquire.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >msg_set_queue</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.sem.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >sem_acquire</TD ></TR ></TABLE ></DIV ></BODY ></HTML >