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\Set merge() Function
- PHP | Ds\Map merge() Function
- D3.js | d3.merge() function
- PHP | Ds\Sequence merge() Function
- PHP | Ds\Deque merge() Function
- How to merge two PHP objects?
- ES6 | Merge Objects
- Git-Checkout And Merge
- JQuery | merge() method
- How to merge the duplicate value in multidimensional array in PHP ?
- Merge two arrays keeping original keys in PHP
- 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.