Skip to content

Tag Archives: PHP-ds_map

The Ds\Map::toArray() function in PHP is used to get an array generated by converting the Map instance into an Array. The resulting array is an… Read More
The Ds\Map::sort() function of DS\Map class in PHP is used to in-place sort the elements of a specified Map instance according to the values. By… Read More
The Ds\Deque::apply() function is an inbuilt function in PHP which is used to update the values of Deque by performing operations as defined by the… Read More
The Ds\Map::slice() function of PHP Ds\Map class is used to get a subset of the specified Map instance. The method returns the subset containing elements… Read More
The Ds\Map::first() function of PHP Ds\Map class is used to get the first key-value pair from the Map instance. Syntax: Ds\Pair public Ds\Map::first ( )… Read More
The Ds\Map::pairs() function in PHP is used to get all of the pairs from the specified Map instance. This function returns a sequence of type… Read More
The Ds\Map::copy() function of PHP is used to get a shallow copy of the specified Map instance. It returns a copy of the Map instance… Read More
The Ds\Map::keys() function of PHP is used to get a set of keys of the current Map instance. The order of keys in the returned… Read More
The Ds\Map::sum() function of PHP is used to get the sum of all of the values present in the Map instance. Syntax: number public Ds\Map::sum… Read More
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… Read More
The Ds\Map::last() function in PHP is used to find and get the last key-value pair from a Map object. If the map is empty then… Read More
The Ds\Map::map() function of the Map class in PHP is used to apply a callback function to a Map object. This returns the result of… Read More
The Ds\Map::apply() function of the Map class in PHP is used to apply a specific operation to all of the elements present in the map.… Read More
The DS\Map::clear() function of the Map class in PHP is used to clear a Map object. That is it deletes all of the values from… Read More
The Ds\Map::hasKey() function in PHP is used to check whether a given Key is present in the Map object or not. It accepts the key… Read More