ftp_pasv

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Turns passive mode on or off
<?php ftp_pasv(FTP\Connection $ftp, bool $enable): bool
<?php     function ftp_pasv(...$arguments)

    {

        if ( ! is_mocked('ftp_pasv')) {

            return \ftp_pasv(...$arguments);

        }



        return return_mocked_value('ftp_pasv');
<?php     private function makeConnectionPassive(FtpConnectionOptions $options, $connection): void

    {

        if ( ! ftp_pasv($connection, $options->passive())) {

            throw new UnableToMakeConnectionPassive(

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

            );