• PHP Video Tutorials

PHP - Ds\Pair::clear() Function



Ds\Pair::clear() function can remove all values from the pair.

Syntax

public void Ds\Pair::clear( void )

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

Ds\Pair::clear() function doesn't return any value.

Example

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