Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Opens an FTP connection
<?php ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false
<?php     private function createConnectionResource(string $host, int $port, int $timeout, bool $ssl)

    {

        $connection = $ssl ? @ftp_ssl_connect($host, $port, $timeout) : @ftp_connect($host, $port, $timeout);



        if ($connection === false) {

            throw UnableToConnectToFtpHost::forHost($host, $port, $ssl);