php8.5
Home/ Manual/ ds / pair/ Ds\Pair::isEmpty

Ds\Pair::isEmpty

PHP function Edit on GitHub ✎

Returns whether the pair is empty

Description

Ds\Pair::isEmpty(): bool

Returns whether the pair is empty.

Parameters Parameters

Return Values

Returns true if the pair is empty, false otherwise.

Examples

Ds\Pair::isEmpty() example

php
<?php
$a = new \Ds\Pair("a", 1);
$b = new \Ds\Pair();

var_dump($a->isEmpty());
var_dump($b->isEmpty());
?>

The above example will output something similar to:

output
bool(false)
bool(true)

Source: reference/ds/ds/pair/isempty.xml · from the official PHP manual (php/doc-en)