Ds\Stack::copyReturns a shallow copy of the stack. Description
public Ds\Stack Ds\Stack::copy
( void
)
Returns a shallow copy of the stack. ParametersThis function has no parameters. Return ValuesReturns a shallow copy of the stack. ExamplesExample #1 Ds\Stack::copy example
<?php The above example will output something similar to: Ds\Stack Object ( [0] => 3 [1] => 2 [2] => 1 ) Ds\Stack Object ( [0] => 4 [1] => 3 [2] => 2 [3] => 1 ) |