php的map,PHP: Map - Manual

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值