In-depth understanding of the implementation of PHP kernel (6) hash tables and PHP hash tables. In-depth understanding of the implementation of the PHP kernel (6) hash table and the PHP hash table, and in-depth understanding of the original article:
In-depth understanding of the implementation of PHP kernel (6) hash tables and PHP hash tables
Link: http://www.orlion.ga/241/
I. Hash table (HashTable)
Hash Tables are used in most implementations of dynamic languages. A hash table is a type of
The php hash uses the most common djbx33a (Daniel J. Bernstein, Times and addition), and this algorithm is widely used with multiple software projects, Apache, Perl and Berkeley DB, and so on. This is the best hash algorithm currently known for
PHP Hash Table implementation
The basic principle of a hash table has been introduced and a fundamental hash table has been implemented, and in real projects, the need for a hash table is far more than simple. There are different requirements
The Hash algorithm in PHP. HashTable is the core of PHP. PHP arrays, associated arrays, object attributes, function tables, symbol tables, and so on all use HashTable as the container. PHP HashTable adopts the zipper Hash Table, which is the core of
One, what is Perl Hash
A hash is a data structure, and a similar array, that can be stored in or retrieved from a value. However, unlike arrays, the index is not a number, but a name. That is, the index (here, we call it key) is not a number but an
Hash Table is the core of PHP.PHP arrays, associated arrays, object attributes, function tables, symbol tables, and so on all use HashTable as the container.PHP HashTable adopts the zipper method to solve conflicts. I don't need to mention this.
Brief introduction
A hash table is used in almost every C program. Since the C language allows only integers to be used as the key name for an array, PHP designs a hash table that maps the key names of strings to arrays of limited size through a
Introduction to the hash algorithm of php
PHP Hash is currently the most common DJBX33A (Daniel J. bernstein, Times 33 with Addition), this algorithm is widely used in multiple software projects, such as Apache, Perl and Berkeley DB. This is the
Hash is a common technique used to store data. In this way, data can be inserted and retrieved quickly. The data structure used by hash is called a hash. Although the hash allows you to quickly insert, delete, and retrieve data, you cannot perform a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.