Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Ds\Map::xorDs\Pair::clear>
^Data StructuresLast updated: Mon, 26 Oct 2026

The Pair class

(PECL ds >= 1.0.0)

Introduction

A pair is used by Ds\Map to pair keys with values.

Class synopsis

class Ds\Pair implements JsonSerializable {
/* Methods */
public function __construct(mixed $key = ?, mixed $value = ?)
public function clear(): void
public function copy(): Ds\Pair
public function isEmpty(): bool
public function toArray(): array
}

Table of Contents


<Ds\Map::xorDs\Pair::clear>
^Data StructuresLast updated: Mon, 26 Oct 2026