PHP | Ds\Sequence remove() Function Last Updated : 22 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Ds\Sequence::remove() function is an inbuilt function in PHP which is used to remove and return a value by index. Syntax: mixed abstract public Ds\Sequence::remove ( int $index ) Parameters: This function accepts a single parameter $index which holds the index of value to remove. Return value: This function returns the value that was removed. Below programs illustrate the Ds\Sequence::remove() function in PHP: Program 1: php <?php // Declare a sequence $seq = new \Ds\Vector(["Geeks", "Hello", "GFG"]); // Use remove() function var_dump($seq->remove(2)); var_dump($seq->remove(0)); ?> Output: string(3) "GFG" string(5) "Geeks" Program 2: php <?php // Declare a sequence $seq = new \Ds\Vector([1, 3, 5, 7, 8, 9]); // Use remove() function $seq->remove(5); $seq->remove(3); $seq->remove(2); $seq->remove(0); var_dump($seq->remove(1)); ?> Output: int(8) Reference: https://www.php.net/manual/en/ds-sequence.remove.php Comment More infoAdvertise with us Next Article PHP | Ds\Sequence remove() Function R R_Raj Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-ds_sequence Similar Reads PHP | DsMap remove() Function The Ds\Map::remove() function is an inbuilt function in PHP which is used to remove and return a value by key. Syntax: mixed Ds\Map::remove( $key, $default ) Parameters: This function accepts two parameters as mentioned above and described below: $key: It holds the key value which need to remove. $d 2 min read PHP DsSet remove() Function The Ds\Set::remove() function of Ds\Set class in PHP is an inbuilt function which is used to remove specific values from a Set instance. This function can remove both single or multiple values from a Set. Syntax: void public Ds\Set::remove ([ mixed $...values ] ) Parameter: This function accepts the 2 min read PHP | DsMap reverse() Function The Ds/Map::reverse() function in PHP is used to in-place reverse the elements of a specified Map instance. That is, the function in-place reverses the order of elements present in the specified Map instance. Syntax: Ds\Map public Ds\Map::reverse ( int $position ) Parameter: This function does not a 2 min read PHP | DsDeque remove() Function The Ds\Deque::remove() function is an inbuilt function in PHP which is used to remove and return the index value. Syntax: public Ds\Deque::remove( $index ) : mixed Parameters: This function accepts single parameter $index which holds the index of Deque for which the element is to be returned and rem 2 min read PHP DsSet reversed() Function The Ds\Set::reversed() function of Ds\Set class in PHP is an inbuilt function which is used to create a copy of the original Set with values arranged in reverse order. That is, this function returns a reversed copy of the actual set. This function does not affect the original set instance. Syntax: D 2 min read Like