• PHP Video Tutorials

PHP - Ds\Pair::copy() Function


Ds\Pair::copy() function can return a shallow copy of the pair.

Syntax

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

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

Ds\Pair::copy() function can return a shallow copy.

Example

<?php  
   $pair = new \Ds\Pair("TP", "TutorialsPoint");  
   print_r($pair);  
   
   $pair->copy();  
   
   echo "The copied pair elements: \n"; 
   print_r($pair);  
?>
php_function_reference.htm
Advertisements