Supported Versions: PHP 5, PHP 7, PHP 8
Returns an array with client, protocol and server version (when available)
<?php pg_version(?PgSql\Connection $connection = null): array
<?php         $a['port'] = pg_port($link);

        $a['dbname'] = pg_dbname($link);

        $a['options'] = pg_options($link);

        $a['version'] = pg_version($link);



        foreach (self::PARAM_CODES as $v) {

            if (false !== $s = pg_parameter_status($link, $v)) {