• PHP Video Tutorials

PHP - Ds Map xor() Function


Advertisements

Ds\Map::xor() function can create a new map using the keys of either current instance or of another map, but not of both.

Syntax

public Ds\Map Ds\Map::xor( Ds\Map $map )

Ds\Map::xor() function can return a new map containing keys in the current instance as well as another map, but not of both.

Example

<?php  
   $map1 = new \Ds\Map(["x" => 1, "y" => 3, "z" => 5]);  
   $map2 = new \Ds\Map(["x" => 2, "z" => 3, "w" => 6]);  
  
   echo("The xor of both map: \n");  
   print_r($map1->xor($map2)); 
?>	
php_function_reference.htm

Useful Video Courses


Video

PHP Online Training

45 Lectures 9 hours

Malhar Lathkar

Video

Become PHP Facebook Developer: Password-Less Authentication

34 Lectures 4 hours

Syed Raza

Video

Ultimate PHP & MySQL Web Development Course & OOP Coding

84 Lectures 5.5 hours

Frahaan Hussain

Video

Learn PHP from Scratch

17 Lectures 1 hours

Nivedita Jain

Video

E Commerce Website Development In PHP With PDO

100 Lectures 34 hours

Azaz Patel

Video

PHP in Telugu

43 Lectures 5.5 hours

Vijay Kumar Parvatha Reddy

Advertisements