Supported Versions: PHP 5, PHP 7, PHP 8
Sends an arbitrary command to an FTP server
<?php ftp_raw(FTP\Connection $ftp, string $command): ?array
<?php     function ftp_raw(...$arguments)

    {

        if ( ! is_mocked('ftp_raw')) {

            return \ftp_raw(...$arguments);

        }



        return return_mocked_value('ftp_raw');
<?php             return $this->isPureFtpdServer;

        }



        $response = ftp_raw($this->connection, 'HELP');



        return $this->isPureFtpdServer = stripos(implode(' ', $response), 'Pure-FTPd') !== false;

    }
<?php             $location = $this->escapePath($location);

        }



        $object = @ftp_raw($this->connection(), 'STAT ' . $location);



        if (empty($object) || count($object) < 3 || substr($object[1], 0, 5) === "ftpd:") {

            throw UnableToRetrieveMetadata::create($path, $type, error_get_last()['message'] ?? '');
<?php             return;

        }



        $response = ftp_raw($connection, "OPTS UTF8 ON");



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

            throw new UnableToEnableUtf8Mode(
<?php     {


        try {

            $response = @ftp_raw($connection, 'NOOP');

        } catch (TypeError $typeError) {

            return false;

        }