pg_port

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the port number associated with the connection
<?php pg_port(?PgSql\Connection $connection = null): string
<?php         $a['last error'] = pg_last_error($link);

        $a['last notice'] = pg_last_notice($link);

        $a['host'] = pg_host($link);

        $a['port'] = pg_port($link);

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

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

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