Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions reference/quickhash/quickhashinthash/set.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>QuickHashIntHash::set</methodname>
<modifier>public</modifier> <type>int</type><methodname>QuickHashIntHash::set</methodname>
<methodparam><type>int</type><parameter>key</parameter></methodparam>
<methodparam><type>int</type><parameter>value</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -49,7 +49,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
2 if the entry was found and updated, 1 if the entry was newly added or 0
2 if the entry was newly added, 1 if the entry was found and updated, or 0
if there was an error.
</simpara>
</refsect1>
Expand All @@ -61,17 +61,17 @@
<programlisting role="php">
<![CDATA[
<?php
$hash = new QuickHashIntHash( 1024 );

$hash = new QuickHashIntHash(1024);

echo "Set->Add\n";
var_dump( $hash->get( 46692 ) );
var_dump( $hash->set( 46692, 16091 ) );
var_dump( $hash->get( 46692 ) );
var_dump($hash->get(46692));
var_dump($hash->set(46692, 16091));
var_dump($hash->get(46692));

echo "Set->Update\n";
var_dump( $hash->set( 46692, 29906 ) );
var_dump( $hash->get( 46692 ) );
?>
echo "\n\nSet->Update\n";
var_dump($hash->set(46692, 29906));
var_dump($hash->get(46692));
]]>
</programlisting>
&example.outputs.similar;
Expand All @@ -81,6 +81,7 @@ Set->Add
bool(false)
int(2)
int(16091)

Set->Update
int(1)
int(29906)
Expand Down