• PHP Video Tutorials

PHP - Pair Class Functions



A pair can be used by Ds\Map to pair keys with the values.

Syntax

Ds\Pair implements JsonSerializable {

   /* Methods */
   public __construct([ mixed $key [, mixed $value ]] )
}
Sr.No Functions & Description
1

Ds\Pair::clear() Function

This function can remove all values from the pair.

2

Ds\Pair::__construct() Function

This function can create a new instance.

3

Ds\Pair::copy() Function

This function can return a shallow copy of the pair.

4

Ds\Pair::isEmpty() Function

This function can return whether the pair is empty.

5

Ds\Pair::jsonSerialize() Function

This function can return a representation that can be converted to JSON.

6

Ds\Pair::toArray() Function

This function can convert a pair to an array.

php_function_reference.htm
Advertisements