• PHP Video Tutorials

PHP - Ds\Stack::copy() Function



Ds\Stack::copy() function can return a shallow copy of the stack.

Syntax

public Ds\Stack Ds\Stack::copy( void )

Ds\Stack::copy() function doesn't have any parameters.

Example

<?php 
   $stack = new \Ds\Stack(); 
  
   $stack->push("Tutorials"); 
   $stack->push("Point"); 
   $stack->push("India"); 
  
   print_r($stack->copy()); 
?>
php_function_reference.htm
Advertisements