1010 <refsect1 role =" description" >
1111 &reftitle.description;
1212 <methodsynopsis >
13- <modifier >public</modifier > <type >bool </type ><methodname >QuickHashIntHash::set</methodname >
13+ <modifier >public</modifier > <type >int </type ><methodname >QuickHashIntHash::set</methodname >
1414 <methodparam ><type >int</type ><parameter >key</parameter ></methodparam >
1515 <methodparam ><type >int</type ><parameter >value</parameter ></methodparam >
1616 </methodsynopsis >
4949 <refsect1 role =" returnvalues" >
5050 &reftitle.returnvalues;
5151 <simpara >
52- 2 if the entry was found and updated , 1 if the entry was newly added or 0
52+ 2 if the entry was newly added , 1 if the entry was found and updated, or 0
5353 if there was an error.
5454 </simpara >
5555 </refsect1 >
6161 <programlisting role =" php" >
6262<![CDATA[
6363<?php
64- $hash = new QuickHashIntHash( 1024 );
64+
65+ $hash = new QuickHashIntHash(1024);
6566
6667echo "Set->Add\n";
67- var_dump( $hash->get( 46692 ) );
68- var_dump( $hash->set( 46692, 16091 ) );
69- var_dump( $hash->get( 46692 ) );
68+ var_dump($hash->get(46692) );
69+ var_dump($hash->set(46692, 16091) );
70+ var_dump($hash->get(46692) );
7071
71- echo "Set->Update\n";
72- var_dump( $hash->set( 46692, 29906 ) );
73- var_dump( $hash->get( 46692 ) );
74- ?>
72+ echo "\n\nSet->Update\n";
73+ var_dump($hash->set(46692, 29906));
74+ var_dump($hash->get(46692));
7575]]>
7676 </programlisting >
7777 &example.outputs.similar;
@@ -81,6 +81,7 @@ Set->Add
8181bool(false)
8282int(2)
8383int(16091)
84+
8485Set->Update
8586int(1)
8687int(29906)
0 commit comments