(PHP 8 >= 8.5.0)
pg_service — Gets the service name of the connection
Returns the name of the connection service used to establish the connection, as defined in the connection service file.
This function is only available if PHP has been built against libpq 18 or later.
connectionЭкземпляр
класса PgSql\Connection.
Функция выберет соединение по умолчанию, если для параметра connection указали значение null.
Соединение по умолчанию — последнее соединение,
которое установила функция pg_connect() или pg_pconnect().
Начиная с PHP 8.1.0 выбор функцией соединения по умолчанию устарел.
A string containing the service name of the connection, or an empty string if no service was used.