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 callback function.
public Ds\Deque::apply( $callback ) : void
Parameters: This function accepts single parameter $callback which holds the function define the operation to be performed on each element of the Deque.
Return value: This function does not return any value.
Below programs illustrate the Ds\Deque::apply() function in PHP:
Elements in the deque are Ds\Deque Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) Updated elements in the deque Ds\Deque Object (  => 10  => 20  => 30  => 40  => 50  => 60 )
Elements in the deque are Ds\Deque Object (  => 10  => 20  => 30  => 40  => 50  => 60 ) Updated elements in the deque Ds\Deque Object (  => 0  => 0  => 0  => 0  => 0  => 0 )
- PHP | Ds\Map apply() Function
- PHP | Ds\Sequence apply() Function
- PHP | Ds\Vector apply() Function
- How to apply !important in CSS?
- How to apply multiple transform property to an element using CSS ?
- How to get the function name inside a function in PHP ?
- D3.js | d3.map.has() Function
- D3.js | d3.map.get() Function
- PHP | pi( ) Function
- p5.js | hex() function
- CSS | url() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.