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         $response = ftp_raw($connection, "OPTS UTF8 ON");



        if ( ! in_array(substr($response[0], 0, 3), ['200', '202'])) {

            throw new UnableToEnableUtf8Mode(

                'Could not set UTF-8 mode for connection: ' . $options->host() . '::' . $options->port()

            );
<?php                         $dirPath .= $part . '/';



                        if ( ! in_array($dirPath, $listedDirectories)) {

                            $listedDirectories[] = $dirPath;

                            yield new DirectoryAttributes(trim($prefix . $dirPath, '/'));

                        }