version_compare

Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Compares two "PHP-standardized" version number strings
<?php version_compare(string $version1, string $version2, ?string $operator = null): int|bool
<?php     public function createDatabasePlatformForVersion($version)

    {

        $mariadb = stripos($version, 'mariadb') !== false;

        if ($mariadb && version_compare($this->getMariaDbMysqlVersionNumber($version), '10.2.7', '>=')) {

            return new MariaDb1027Platform();

        }
<?php         if (! $mariadb) {

            $oracleMysqlVersion = $this->getOracleMysqlVersionNumber($version);

            if (version_compare($oracleMysqlVersion, '8', '>=')) {

                return new MySQL80Platform();

            }
<?php                 return new MySQL80Platform();

            }



            if (version_compare($oracleMysqlVersion, '5.7.9', '>=')) {

                return new MySQL57Platform();

            }

        }
<?php         $patchVersion = $versionParts['patch'] ?? 0;

        $version      = $majorVersion . '.' . $minorVersion . '.' . $patchVersion;



        if (version_compare($version, '10.0', '>=')) {

            return new PostgreSQL100Platform();

        }
<?php             $wrappedConnection = $this->connection->getWrappedConnection();

            assert($wrappedConnection instanceof ServerInfoAwareConnection);



            if (version_compare($wrappedConnection->getServerVersion(), '8', '>=')) {

                self::markTestIncomplete('PHP currently does not completely support MySQL 8');

            }

        }