Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if a value exists in an array
<?php in_array(mixed $needle, array $haystack, bool $strict = false): bool
<?php     public function isWordIgnored(string $word): bool

    {

        return in_array(strtolower($word), [

            ...$this->whitelistedWords,

            ...PresetProvider::whitelistedWords($this->preset),

        ]);

    }
<?php     private function takeSuggestions(array $suggestions): array

    {

        $suggestions = array_filter($suggestions,

            fn (string $suggestion): bool => in_array(preg_match('/[^a-zA-Z]/', $suggestion), [0, false], true)

        );



        return array_slice(array_values(array_unique($suggestions)), 0, 4);