svn: /phpdoc/en/trunk/reference/apc/functions/ apc-cas.xml
| From: | Kalle Sommer Nielsen | Date: | Wed, 29 Dec 2010 08:31:34 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/apc/functions/ apc-cas.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7582@lists.php.net to get a copy of this message | ||
kalle Wed, 29 Dec 2010 08:31:34 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306812
Log:
Documented the apc_cas() function better
Changed paths:
U phpdoc/en/trunk/reference/apc/functions/apc-cas.xml
Modified: phpdoc/en/trunk/reference/apc/functions/apc-cas.xml
===================================================================
--- phpdoc/en/trunk/reference/apc/functions/apc-cas.xml 2010-12-29 07:25:58 UTC (rev 306811)
+++ phpdoc/en/trunk/reference/apc/functions/apc-cas.xml 2010-12-29 08:31:34 UTC (rev 306812)
@@ -4,7 +4,7 @@
<refentry xml:id="function.apc-cas" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>apc_cas</refname>
- <refpurpose>apc_cas</refpurpose>
+ <refpurpose>Updates an old value with a new value</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -16,11 +16,10 @@
<methodparam><type>int</type><parameter>new</parameter></methodparam>
</methodsynopsis>
<para>
- apc_cas
+ <function>apc_cas</function> updates an already existing integer value if the
+ <parameter>old</parameter> parameter matches the currently stored value
+ with the value of the <parameter>new</parameter> parameter.
</para>
-
- &warn.undocumented.func;
-
</refsect1>
<refsect1 role="parameters">
@@ -30,7 +29,7 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
-
+ The key of the value being updated.
</para>
</listitem>
</varlistentry>
@@ -38,7 +37,7 @@
<term><parameter>old</parameter></term>
<listitem>
<para>
-
+ The old value (the value currently stored).
</para>
</listitem>
</varlistentry>
@@ -46,7 +45,7 @@
<term><parameter>new</parameter></term>
<listitem>
<para>
-
+ The new value to update to.
</para>
</listitem>
</varlistentry>
@@ -68,7 +67,7 @@
<programlisting role="php">
<![CDATA[
<?php
-apc_store('foobar',2);
+apc_store('foobar', 2);
echo '$foobar = 2', PHP_EOL;
echo '$foobar == 1 ? 2 : 1 = ', (apc_cas('foobar', 1, 2) ? 'ok' :
'fail'), PHP_EOL;
echo '$foobar == 2 ? 1 : 2 = ', (apc_cas('foobar', 2, 1) ? 'ok' :
'fail'), PHP_EOL;