Advent of code 2016/3
Ajax Direct

Answer

Part 1 :
Part 2 :
function triangle($sides)
{
    $sides = $sides->sort()->values();
    return $sides[0] + $sides[1] > $sides[2];
}

// ==================================================
// > PART 1
// ==================================================
$solution_1 = $input->numbers()->chunk(3)->filter("triangle")->count();

// ==================================================
// > PART 2
// ==================================================
$solution_2 = grid($input, 5)->columns()->merge()->map("trim")->chunk(3)->filter("triangle")->count();