造成这种速度优势的原因是数组是固定大小的,而默认的 PHP 数组是可变大小的,并且不允许非数值型索引。
This speedup is due to the fact that the array is a fixed size, not a variable-sized one like the default PHP one is, and that non-numeric indexes are not allowed.
arrays类提供了一系列处理数组的静态工具方法,这些索引的数据结构的大小是固定的。
The arrays class provides a series of static utility methods for working with arrays, those indexed data structures that are of a fixed size.
hash索引常常使用一个数组来实现,数组中的每个元素是一个有固定大小的hash bucket,如图1所示。
A hash index is often implemented using an array where each element in the array is a hash bucket with a fixed size, as is depicted in Figure 1.
应用推荐