Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if the class has been defined
<?php class_exists(string $class, bool $autoload = true): bool
<?php     public static function setUpBeforeClass(): void

    {

        if ( ! class_exists('phpseclib\Net\SFTP')) {

            self::markTestSkipped("PHPSecLib V2 is not installed");

        }

    }
<?php {

    protected function setUp(): void

    {

        if ( ! class_exists('phpseclib\Net\SFTP')) {

            self::markTestSkipped("PHPSecLib V2 is not installed");

        }
<?php {

    public static function setUpBeforeClass(): void

    {

        if ( ! class_exists(SFTP::class)) {

            self::markTestIncomplete("No phpseclib v3 installed");

        }

    }
<?php {

    public static function setUpBeforeClass(): void

    {

        if ( ! class_exists(SFTP::class)) {

            self::markTestIncomplete("No phpseclib v3 installed");

        }

    }
<?php include __DIR__ . '/../vendor/autoload.php';



$providerName = class_exists(SFTP::class) ? V3Provider::class : V2Provider::class;

$connectionProvider = $providerName::fromArray(

    [

        'host' => 'localhost',