PHP - Fonction Ds \ Pair :: copy ()

La fonction Ds \ Pair :: copy () peut renvoyer une copie superficielle de la paire.

Syntaxe

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

La fonction Ds \ Pair :: copy () n'a aucun paramètre.

La fonction Ds \ Pair :: copy () peut renvoyer une copie superficielle.

Exemple

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