Advent of code 2020/6
Ajax Direct

Answer

Part 1 :
Part 2 :
// ==================================================
// > PART 1
// ==================================================
$solution_1 =  $input->split("\n\n")->map(fn ($group) =>
    $group->lines->join("")->chars()->unique()->count()
)->sum();

// ==================================================
// > PART 2
// ==================================================
$solution_2 = $input->split("\n\n")->map(fn ($group) =>
    $group->lines->join("")->chars()->occurrences()
    ->keep($group->lines->count())
    ->count()
)->sum();