php8.5
Home/ Manual/ pgsql / functions/ pg_options

pg_options

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Get the options associated with the connection

Description

pg_options(PgSql\Connection|null $connection = null): string

pg_options() will return a string containing the options specified on the given PostgreSQL connection instance.

Parameters

connection

Connection-with-nullable-default

Return Values

A string containing the connection options.

Changelog

VersionDescription
8.0.0connection is now nullable.

Examples

pg_options() example

php
<?php
   $pgsql_conn = pg_connect("dbname=mark host=localhost");
   echo pg_options($pgsql_conn);
?>

See Also

Source: reference/pgsql/functions/pg-options.xml · from the official PHP manual (php/doc-en)