• PHP Video Tutorials

PHP - Ds\Pair::isEmpty() Function



Ds\Pair::isEmpty() function can return whether the pair is empty.

Syntax

public bool Ds\Pair::isEmpty( void )

Ds\Pair::isEmpty() function doesn't have any parameters.

Ds\Pair::isEmpty() function can return true if the pair is empty, or false otherwise.

Example-1

<?php 
   $map = new \Ds\Map(["1" => "Tutorials", "2" => "Point", "3" => "India"]); 
   var_dump($map->isEmpty()); 
?>

Example-2

<?php 
   $map = new \Ds\Map(); 
   
   var_dump($map->isEmpty()); 
?>
php_function_reference.htm
Advertisements