略微加速
PHP官方手册 - 互联网笔记
首页
IT
PHP手册
Elasticsearch
SVN手册
互联网
博客
登陆
注册
PHP - Manual: Data Structures
2024-12-23
简介 »
« untaint
PHP 手册
函数参考
其它基本扩展
Data Structures
简介
安装/配置
需求
安装
预定义常量
范例
Collection
— The Collection interface
Ds\Collection::clear
— Removes all values
Ds\Collection::copy
— Returns a shallow copy of the collection
Ds\Collection::isEmpty
— Returns whether the collection is empty
Ds\Collection::toArray
— Converts the collection to an array
Hashable
— The Hashable interface
Ds\Hashable::equals
— Determines whether an object is equal to the current instance
Ds\Hashable::hash
— Returns a scalar value to be used as a hash value
Sequence
— The Sequence interface
Ds\Sequence::allocate
— Allocates enough memory for a required capacity
Ds\Sequence::apply
— Updates all values by applying a callback function to each value
Ds\Sequence::capacity
— Returns the current capacity
Ds\Sequence::contains
— Determines if the sequence contains given values
Ds\Sequence::filter
— Creates a new sequence using a callable to determine which values to include
Ds\Sequence::find
— Attempts to find a value's index
Ds\Sequence::first
— Returns the first value in the sequence
Ds\Sequence::get
— Returns the value at a given index
Ds\Sequence::insert
— Inserts values at a given index
Ds\Sequence::join
— Joins all values together as a string
Ds\Sequence::last
— Returns the last value
Ds\Sequence::map
— Returns the result of applying a callback to each value
Ds\Sequence::merge
— Returns the result of adding all given values to the sequence
Ds\Sequence::pop
— Removes and returns the last value
Ds\Sequence::push
— Adds values to the end of the sequence
Ds\Sequence::reduce
— Reduces the sequence to a single value using a callback function
Ds\Sequence::remove
— Removes and returns a value by index
Ds\Sequence::reverse
— Reverses the sequence in-place
Ds\Sequence::reversed
— Returns a reversed copy
Ds\Sequence::rotate
— Rotates the sequence by a given number of rotations
Ds\Sequence::set
— Updates a value at a given index
Ds\Sequence::shift
— Removes and returns the first value
Ds\Sequence::slice
— Returns a sub-sequence of a given range
Ds\Sequence::sort
— Sorts the sequence in-place
Ds\Sequence::sorted
— Returns a sorted copy
Ds\Sequence::sum
— Returns the sum of all values in the sequence
Ds\Sequence::unshift
— Adds values to the front of the sequence
Vector
— The Vector class
Ds\Vector::allocate
— Allocates enough memory for a required capacity
Ds\Vector::apply
— Updates all values by applying a callback function to each value
Ds\Vector::capacity
— Returns the current capacity
Ds\Vector::clear
— Removes all values
Ds\Vector::__construct
— Creates a new instance
Ds\Vector::contains
— Determines if the vector contains given values
Ds\Vector::copy
— Returns a shallow copy of the vector
Ds\Vector::count
— Returns the number of values in the collection
Ds\Vector::filter
— Creates a new vector using a callable to determine which values to include
Ds\Vector::find
— Attempts to find a value's index
Ds\Vector::first
— Returns the first value in the vector
Ds\Vector::get
— Returns the value at a given index
Ds\Vector::insert
— Inserts values at a given index
Ds\Vector::isEmpty
— Returns whether the vector is empty
Ds\Vector::join
— Joins all values together as a string
Ds\Vector::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Vector::last
— Returns the last value
Ds\Vector::map
— Returns the result of applying a callback to each value
Ds\Vector::merge
— Returns the result of adding all given values to the vector
Ds\Vector::pop
— Removes and returns the last value
Ds\Vector::push
— Adds values to the end of the vector
Ds\Vector::reduce
— Reduces the vector to a single value using a callback function
Ds\Vector::remove
— Removes and returns a value by index
Ds\Vector::reverse
— Reverses the vector in-place
Ds\Vector::reversed
— Returns a reversed copy
Ds\Vector::rotate
— Rotates the vector by a given number of rotations
Ds\Vector::set
— Updates a value at a given index
Ds\Vector::shift
— Removes and returns the first value
Ds\Vector::slice
— Returns a sub-vector of a given range
Ds\Vector::sort
— Sorts the vector in-place
Ds\Vector::sorted
— Returns a sorted copy
Ds\Vector::sum
— Returns the sum of all values in the vector
Ds\Vector::toArray
— Converts the vector to an array
Ds\Vector::unshift
— Adds values to the front of the vector
Deque
— The Deque class
Ds\Deque::allocate
— Allocates enough memory for a required capacity
Ds\Deque::apply
— Updates all values by applying a callback function to each value
Ds\Deque::capacity
— Returns the current capacity
Ds\Deque::clear
— Removes all values from the deque
Ds\Deque::__construct
— Creates a new instance
Ds\Deque::contains
— Determines if the deque contains given values
Ds\Deque::copy
— Returns a shallow copy of the deque
Ds\Deque::count
— Returns the number of values in the collection
Ds\Deque::filter
— Creates a new deque using a callable to determine which values to include
Ds\Deque::find
— Attempts to find a value's index
Ds\Deque::first
— Returns the first value in the deque
Ds\Deque::get
— Returns the value at a given index
Ds\Deque::insert
— Inserts values at a given index
Ds\Deque::isEmpty
— Returns whether the deque is empty
Ds\Deque::join
— Joins all values together as a string
Ds\Deque::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Deque::last
— Returns the last value
Ds\Deque::map
— Returns the result of applying a callback to each value
Ds\Deque::merge
— Returns the result of adding all given values to the deque
Ds\Deque::pop
— Removes and returns the last value
Ds\Deque::push
— Adds values to the end of the deque
Ds\Deque::reduce
— Reduces the deque to a single value using a callback function
Ds\Deque::remove
— Removes and returns a value by index
Ds\Deque::reverse
— Reverses the deque in-place
Ds\Deque::reversed
— Returns a reversed copy
Ds\Deque::rotate
— Rotates the deque by a given number of rotations
Ds\Deque::set
— Updates a value at a given index
Ds\Deque::shift
— Removes and returns the first value
Ds\Deque::slice
— Returns a sub-deque of a given range
Ds\Deque::sort
— Sorts the deque in-place
Ds\Deque::sorted
— Returns a sorted copy
Ds\Deque::sum
— Returns the sum of all values in the deque
Ds\Deque::toArray
— Converts the deque to an array
Ds\Deque::unshift
— Adds values to the front of the deque
Map
— The Map class
Ds\Map::allocate
— Allocates enough memory for a required capacity
Ds\Map::apply
— Updates all values by applying a callback function to each value
Ds\Map::capacity
— Returns the current capacity
Ds\Map::clear
— Removes all values
Ds\Map::__construct
— Creates a new instance
Ds\Map::copy
— Returns a shallow copy of the map
Ds\Map::count
— Returns the number of values in the map
Ds\Map::diff
— Creates a new map using keys that aren't in another map
Ds\Map::filter
— Creates a new map using a callable to determine which pairs to include
Ds\Map::first
— Returns the first pair in the map
Ds\Map::get
— Returns the value for a given key
Ds\Map::hasKey
— Determines whether the map contains a given key
Ds\Map::hasValue
— Determines whether the map contains a given value
Ds\Map::intersect
— Creates a new map by intersecting keys with another map
Ds\Map::isEmpty
— Returns whether the map is empty
Ds\Map::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Map::keys
— Returns a set of the map's keys
Ds\Map::ksort
— Sorts the map in-place by key
Ds\Map::ksorted
— Returns a copy, sorted by key
Ds\Map::last
— Returns the last pair of the map
Ds\Map::map
— Returns the result of applying a callback to each value
Ds\Map::merge
— Returns the result of adding all given associations
Ds\Map::pairs
— Returns a sequence containing all the pairs of the map
Ds\Map::put
— Associates a key with a value
Ds\Map::putAll
— Associates all key-value pairs of a traversable object or array
Ds\Map::reduce
— Reduces the map to a single value using a callback function
Ds\Map::remove
— Removes and returns a value by key
Ds\Map::reverse
— Reverses the map in-place
Ds\Map::reversed
— Returns a reversed copy
Ds\Map::skip
— Returns the pair at a given positional index
Ds\Map::slice
— Returns a subset of the map defined by a starting index and length
Ds\Map::sort
— Sorts the map in-place by value
Ds\Map::sorted
— Returns a copy, sorted by value
Ds\Map::sum
— Returns the sum of all values in the map
Ds\Map::toArray
— Converts the map to an array
Ds\Map::union
— Creates a new map using values from the current instance and another map
Ds\Map::values
— Returns a sequence of the map's values
Ds\Map::xor
— Creates a new map using keys of either the current instance or of another map, but not of both
Pair
— The Pair class
Ds\Pair::clear
— Removes all values
Ds\Pair::__construct
— Creates a new instance
Ds\Pair::copy
— Returns a shallow copy of the pair
Ds\Pair::isEmpty
— Returns whether the pair is empty
Ds\Pair::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Pair::toArray
— Converts the pair to an array
Set
— The Set class
Ds\Set::add
— Adds values to the set
Ds\Set::allocate
— Allocates enough memory for a required capacity
Ds\Set::capacity
— Returns the current capacity
Ds\Set::clear
— Removes all values
Ds\Set::__construct
— Creates a new instance
Ds\Set::contains
— Determines if the set contains all values
Ds\Set::copy
— Returns a shallow copy of the set
Ds\Set::count
— Returns the number of values in the set
Ds\Set::diff
— Creates a new set using values that aren't in another set
Ds\Set::filter
— Creates a new set using a callable to determine which values to include
Ds\Set::first
— Returns the first value in the set
Ds\Set::get
— Returns the value at a given index
Ds\Set::intersect
— Creates a new set by intersecting values with another set
Ds\Set::isEmpty
— Returns whether the set is empty
Ds\Set::join
— Joins all values together as a string
Ds\Set::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Set::last
— Returns the last value in the set
Ds\Set::merge
— Returns the result of adding all given values to the set
Ds\Set::reduce
— Reduces the set to a single value using a callback function
Ds\Set::remove
— Removes all given values from the set
Ds\Set::reverse
— Reverses the set in-place
Ds\Set::reversed
— Returns a reversed copy
Ds\Set::slice
— Returns a sub-set of a given range
Ds\Set::sort
— Sorts the set in-place
Ds\Set::sorted
— Returns a sorted copy
Ds\Set::sum
— Returns the sum of all values in the set
Ds\Set::toArray
— Converts the set to an array
Ds\Set::union
— Creates a new set using values from the current instance and another set
Ds\Set::xor
— Creates a new set using values in either the current instance or in another set, but not in both
Stack
— The Stack class
Ds\Stack::allocate
— Allocates enough memory for a required capacity
Ds\Stack::capacity
— Returns the current capacity
Ds\Stack::clear
— Removes all values
Ds\Stack::__construct
— Creates a new instance
Ds\Stack::copy
— Returns a shallow copy of the stack
Ds\Stack::count
— Returns the number of values in the stack
Ds\Stack::isEmpty
— Returns whether the stack is empty
Ds\Stack::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Stack::peek
— Returns the value at the top of the stack
Ds\Stack::pop
— Removes and returns the value at the top of the stack
Ds\Stack::push
— Pushes values onto the stack
Ds\Stack::toArray
— Converts the stack to an array
Queue
— The Queue class
Ds\Queue::allocate
— Allocates enough memory for a required capacity
Ds\Queue::capacity
— Returns the current capacity
Ds\Queue::clear
— Removes all values
Ds\Queue::__construct
— Creates a new instance
Ds\Queue::copy
— Returns a shallow copy of the queue
Ds\Queue::count
— Returns the number of values in the queue
Ds\Queue::isEmpty
— Returns whether the queue is empty
Ds\Queue::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\Queue::peek
— Returns the value at the front of the queue
Ds\Queue::pop
— Removes and returns the value at the front of the queue
Ds\Queue::push
— Pushes values into the queue
Ds\Queue::toArray
— Converts the queue to an array
PriorityQueue
— The PriorityQueue class
Ds\PriorityQueue::allocate
— Allocates enough memory for a required capacity
Ds\PriorityQueue::capacity
— Returns the current capacity
Ds\PriorityQueue::clear
— Removes all values
Ds\PriorityQueue::__construct
— Creates a new instance
Ds\PriorityQueue::copy
— Returns a shallow copy of the queue
Ds\PriorityQueue::count
— Returns the number of values in the queue
Ds\PriorityQueue::isEmpty
— Returns whether the queue is empty
Ds\PriorityQueue::jsonSerialize
— Returns a representation that can be converted to JSON
Ds\PriorityQueue::peek
— Returns the value at the front of the queue
Ds\PriorityQueue::pop
— Removes and returns the value with the highest priority
Ds\PriorityQueue::push
— Pushes values into the queue
Ds\PriorityQueue::toArray
— Converts the queue to an array
add a note
User Contributed Notes
There are no user contributed notes for this page.
官方地址:
https://www.php.net/manual/en/book.ds.php
有任何技术问题请点击这里
网站运营推广招聘
IT
PHP
编程语言
Linux
开发编程
科技
Elasticsearch
HTML/CSS/XML
网络
数据库
JAVA
面试
NoSQL
C/C++
Golang
Git
算法
操作系统
正则表达式
Redis
互联网
MySql
JavaScript
运维
软件
国际
架构设计
Mac OS
TCP/IP
Excel
Vim
Windows
Socket
Oracle
VR
MongoDB
Python
运营
MemCache
商业
硬件
电子
娱乐
设计
nginx
摄影
游戏
WordPress
HTTP
团建
数码电器
广告
广告
php7 安装fileinfo扩展
preg_split — 通过一个正则表达式分隔字符串
php位值,解决 PHP 中 usort 在值相同时改变原始位置的问题
[PHP] inet_pton/inet_ntop IP地址转换函数
[鸟哥]PHP_INT_MIN 和 -9223372036854775808
PHP 8.1
ADORecordSet对象
adodb手册
opcache预加载
Composer的Packagist资源
array_multisort() 多字段排序
PHPMailer设置utf8 PHPMailer字符集CharSet
PHP json解析(json_decode)页面工具
php中几种注释规范
mysql面试题
纯php实现DES以及TripleDES加密算法
[原创]诡异的php-fpm超时问题
两千行PHP学习笔记
html转义/html编码/html解码
PHP获取指定函数定义在哪个文件中及行号
联系我们
半月雨文化
可降解耗材网
蓝云环保
78免费小説
上海网站seo优化
工程造价
币安app官网下载
币安app官网下载安卓
币安app官网下载
seo查询
北京半月雨文化科技有限公司
.版权所有
京ICP备12026184号-3