Last active
January 4, 2019 14:20
-
-
Save yayaenan/5e9f3eead74efda3b8c88b9aee12fa9c to your computer and use it in GitHub Desktop.
QA ENGINEERING
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MergeNames | |
{ | |
public static function unique_names($array1, $array2) | |
{ | |
return array_unique(array_merge($array1,$array2)); | |
} | |
} | |
$names = MergeNames::unique_names(['Ava', 'Emma', 'Olivia'], ['Olivia', 'Sophia', 'Emma']); | |
echo join(', ', $names); // should print Emma, Olivia, Ava, Sophia |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment