PHP adds operations to the instance code in the array. How does PHP add an operation to the array to operate the instance code? Php $ aarray (aapple, bbanana); $ barray (apear, bstrawberry, ccherry); $ c $ a $ B; Unionof PHP addition in the array operation instance code
- $ A = array ("a" => "apple", "B" => "banana ");
- $ B = array ("a" => "pear", "B" => "strawberry", "c" => "cherry ");
- $ C = $ a $ B; // Union of $ a and $ B
- Echo "Union of $ a and $ B :";
- Var_dump ($ c );
- $ C = $ B $ a; // Union of $ B and $
- Echo "Union of $ B and $ :";
- Var_dump ($ c );
- ?>
- Array (3 ){
- ["A"] =>
- String (5) "apple"
- ["B"] =>
- String (6) "banana"
- ["C"] =>
- String (6) "cherry"
- }
- Union of $ B and $:
- Array (3 ){
- ["A"] =>
- String (4) "pear"
- ["B"] =>
- String (10) "strawberry"
- ["C"] =>
- String (6) "cherry"
- }
- ?>
How does the http://www.bkjia.com/PHPjc/486165.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486165.htmlTechArticlePHP add a method to the array to operate the instance code? Php $ a = array ("a" = "apple", "B" = "banana"); $ B = array ("a" = "pear ", "B" = "strawberry", "c" = "cherry"); $ c = $ a $ B; // Union...