Skip to content

Instantly share code, notes, and snippets.

@yayaenan
Last active January 4, 2019 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yayaenan/5e9f3eead74efda3b8c88b9aee12fa9c to your computer and use it in GitHub Desktop.
Save yayaenan/5e9f3eead74efda3b8c88b9aee12fa9c to your computer and use it in GitHub Desktop.
QA ENGINEERING
<?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