PHP | Ds\Map isEmpty() Function Last Updated : 20 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Ds\Map::isEmpty() function in PHP is used to check whether a given Map is empty or not. A Map is empty to be empty if does not contain any key-value pair. Syntax: Ds\Map public Ds\Map::isEmpty ( void ) Parameter: It does not accepts any parameter. Return value: This function returns a boolean value, True or False based on whether the Map object is Empty or not. Below program illustrate the Ds\Map::isEmpty() function in PHP: Program 1: php <?php // PHP program to illustrate the isEmpty() // function of Ds\map // Creating a Map $map = new \Ds\Map(["1" => "Geeks", "2" => "for", "3" => "Geeks"]); // Check if the Map is empty or not var_dump($map->isEmpty()); ?> Output: bool(false) Program 2: php <?php // PHP program to illustrate the isEmpty() // function of Ds\map // Creating a Map $map = new \Ds\Map(); // Check if the Map is empty or not var_dump($map->isEmpty()); ?> Output: bool(true) Reference: http://php.net/manual/en/ds-map.isempty.php Comment More infoAdvertise with us Next Article PHP | Ds\Map isEmpty() Function G gopaldave Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-ds_map Similar Reads PHP DsSet isEmpty() Function The Ds\Set::isEmpty() function of Ds\Set class in PHP is an inbuilt function which is used to check whether a set is empty or not. If the Set instance is empty then this function returns true otherwise it returns False. Syntax: bool public Ds\Set::isEmpty ( void ) Parameters: This function does not 1 min read PHP | DsDeque isEmpty() Function The Ds\Deque::isEmpty() function is an inbuilt function in PHP which is used to check the Deque is empty or not. Syntax: public Ds\Deque::isEmpty( void ) : bool Parameters: This function does not accept any parameter. Return Value: This function returns true if the Deque is empty, else return false. 1 min read PHP | DsStack isEmpty() Function The Ds\Stack::isEmpty() function of PHP Ds\Stack class is used to check whether a Stack is empty or not. This method returns a boolean value, True if the Stack is empty otherwise it returns False. Syntax: bool public Ds\Stack::isEmpty ( void ) Parameter: This function does not accept any parameters. 1 min read PHP DsQueue isEmpty() Function The Ds\Queue::isEmpty() Function in PHP is used to whether a particular Queue instance is empty or not. It returns True if the Queue is empty otherwise it returns False. Syntax: bool public Ds\Queue::isEmpty ( void ) Parameters: This function does not accepts any parameters. Return Value: This funct 1 min read PHP | DsVector isEmpty() Function The Ds\Vector::isEmpty() function is an inbuilt function in PHP which is used to check the vector is empty or not. Syntax: bool public Ds\Vector::isEmpty( void ) Parameters: This function does not accept any parameter. Return Value: This function returns true if the vector is empty, false otherwise. 1 min read Like