php-doc-en/reference/shmop/functions/shmop-size.xml
Maciej Sobaczewski 3906c681cd Fix inconsistent changelogs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340948 c90b9560-bf6c-de11-be94-00142212c4b1
2016-11-11 12:55:45 +00:00

106 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.shmop-size" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>shmop_size</refname>
<refpurpose>Get size of shared memory block</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>shmop_size</methodname>
<methodparam><type>resource</type><parameter>shmid</parameter></methodparam>
</methodsynopsis>
<para>
<function>shmop_size</function> is used to get the size, in bytes of the
shared memory block.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>shmid</parameter></term>
<listitem>
<para>
The shared memory block identifier created by
<function>shmop_open</function>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an int, which represents the number of bytes the shared memory
block occupies.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.0.0</entry>
<entry>
The type of <parameter>shmid</parameter> has been changed from
<type>int</type> to <type>resource</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Getting the size of the shared memory block</title>
<programlisting role="php">
<![CDATA[
<?php
$shm_size = shmop_size($shm_id);
?>
]]>
</programlisting>
</example>
</para>
<para>
This example will put the size of shared memory block identified by
<literal>$shm_id</literal> into <literal>$shm_size</literal>.
</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:"~/.phpdoc/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
-->