« Ds\Map::xor
Ds\Pair::clear »
PHP Manual
Data Structures
The Pair class
The Pair class
(PECL ds >= 1.0.0)
简介
A pair is used by
Ds\Map
to pair keys with values.
类摘要
class
Ds\Pair
implements
JsonSerializable
{
/* 方法 */
public
__construct
(
mixed
$key
= ?
,
mixed
$value
= ?
)
public
clear
():
void
public
copy
():
Ds\Pair
public
isEmpty
():
bool
public
toArray
():
array
}
目录
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