get(1) ?: readline("Enter the anagram: "); $minLength = $args->get(2) ?: 3; $top10 = $args->hasOption('top'); Output::line(); Output::line("Results for your anagram: " . $anagram); $matches = Matcher::findWords($anagram, $minLength); if ($top10) { $matches = $matches->slice(0, 10); } $matches->each(fn (string $word) => Output::line($word . " (" . strlen($word) . ")"));