<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="ffi.memcmp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>FFI::memcmp</refname>
  <refpurpose>Compares memory areas</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis role="FFI">
   <modifier>public</modifier> <modifier>static</modifier> <type>int</type><methodname>FFI::memcmp</methodname>
   <methodparam><type class="union"><type>string</type><type>FFI\CData</type></type><parameter role="reference">ptr1</parameter></methodparam>
   <methodparam><type class="union"><type>string</type><type>FFI\CData</type></type><parameter role="reference">ptr2</parameter></methodparam>
   <methodparam><type>int</type><parameter>size</parameter></methodparam>
  </methodsynopsis>
  <para>
   Compares <parameter>size</parameter> bytes from the memory areas <parameter>ptr1</parameter> and
   <parameter>ptr2</parameter>. Both <parameter>ptr1</parameter> and <parameter>ptr2</parameter>
   can be any native data structures (<classname>FFI\CData</classname>) or PHP
   <type>string</type>s.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>ptr1</parameter></term>
    <listitem>
     <para>
      The start of one memory area.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>ptr2</parameter></term>
    <listitem>
     <para>
      The start of another memory area.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>size</parameter></term>
    <listitem>
     <para>
      The number of bytes to compare.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a value less than <literal>0</literal> if the contents of the memory area starting at <parameter>ptr1</parameter>
   are considered less than the contents of the memory area starting at <parameter>ptr2</parameter>,
   a value greater than <literal>0</literal> if the contents of the first memory area are considered greater than the second,
   and <literal>0</literal> if they are equal.
  </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
-->
