pg_port

(PHP 3, PHP 4 >= 4.0b1)

pg_port --  Return the port number associated with the connection

Description

int pg_port (int connection_id)

pg_port() will return the port number that the given PostgreSQL connection identifier is connected to.