The Ds\Vector::merge() function is an inbuilt function in PHP which is used to merge all the elements to the vector.
Ds\Vector public Ds\Vector::merge( $values )
Parameters: This function accepts a single parameter $values which is the traversable object or array.
Return Value: This function returns the copy of the vector after merging the elements to the vector.
Below programs illustrate the Ds\Vector::merge() function in PHP:
Original vector elements Ds\Vector Object (  => 10  => 20  => 30  => 40  => 50 ) Vector Elements after merging Ds\Vector Object (  => 10  => 20  => 30  => 40  => 50  => 60  => 70  => 80  => 90  => 100 )
Original vector elements Ds\Vector Object (  => geeks  => for  => geeks ) Vector Elements after merging Ds\Vector Object (  => geeks  => for  => geeks  => 60  => 70  => 100 )
- PHP | Ds\Sequence merge() Function
- PHP | Ds\Deque merge() Function
- PHP | Ds\Set merge() Function
- PHP | Ds\Map merge() Function
- Merge two arrays keeping original keys in PHP
- How to merge two PHP objects?
- How to merge the duplicate value in multidimensional array in PHP ?
- How to merge arrays and preserve the keys in PHP ?
- D3.js | d3.merge() function
- D3.js selection.merge() Function
- Git-Checkout And Merge
- ES6 | Merge Objects
- JQuery | merge() method
- How to merge the first index of an array with the first index of second array?
- Underscore.js _.merge() Method
- Lodash _.merge() Method
- Collect.js merge() Method
- How to get the function name inside a function in PHP ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.