mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-23 04:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321911 c90b9560-bf6c-de11-be94-00142212c4b1
106 lines
2.7 KiB
XML
106 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="quickhashstringinthash.delete" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>QuickHashStringIntHash::delete</refname>
|
|
<refpurpose>This method deletes am entry from the hash</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>QuickHashStringIntHash::delete</methodname>
|
|
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This method deletes an entry from the hash, and returns whether the entry was
|
|
deleted or not. Associated memory structures will not be freed immediately,
|
|
but rather when the hash itself is freed.
|
|
</para>
|
|
<para>
|
|
Elements can not be deleted when the hash is used in an iterator. The
|
|
method will not throw an exception, but simply return &false; like would
|
|
happen with any other deletion failure.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>key</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The key of the entry to delete.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&true; when the entry was deleted, and &false; if the entry was not deleted.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>QuickHashStringIntHash::delete</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[<?php
|
|
$hash = new QuickHashStringIntHash( 1024 );
|
|
var_dump( $hash->exists( 'four' ) );
|
|
var_dump( $hash->add( 'four', 5 ) );
|
|
var_dump( $hash->get( 'four' ) );
|
|
var_dump( $hash->delete( 'four' ) );
|
|
var_dump( $hash->exists( 'four' ) );
|
|
var_dump( $hash->get( 'four' ) );
|
|
var_dump( $hash->delete( 'four' ) );
|
|
?>]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
bool(false)
|
|
bool(true)
|
|
int(5)
|
|
bool(true)
|
|
bool(false)
|
|
bool(false)
|
|
bool(false)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</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
|
|
-->
|