pg_set_error_context_visibility

FunctionAdded in PHP 8.3

Determines the visibility of the context's error messages returned by pg_last_error and pg_result_error.

PHP 5
PHP 7
PHP 8.0-8.1
PHP 8.2
PHP 8.3
Added
PHP 8.4
PHP 8.5
PHP 8.6

pg_set_error_context_visibility Function synopsis

pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int

Parameters

$connection

TypePgSql\Connection

$visibility

Typeint

The required visibility: PGSQL_SHOW_CONTEXT_NEVER, PGSQL_SHOW_CONTEXT_ERRORS or PGSQL_SHOW_CONTEXT_ALWAYS.

Return value

Typeint

The previous visibility level: PGSQL_SHOW_CONTEXT_NEVER, PGSQL_SHOW_CONTEXT_ERRORS or PGSQL_SHOW_CONTEXT_ALWAYS.

Changes to the pg_set_error_context_visibility Function

PHP 8.3

  • Function added

pg_set_error_context_visibility Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only No
PHP 8.1Unsupported No
PHP 8.0Unsupported No
PHP 7.4Unsupported No
PHP 7.3Unsupported No
PHP 7.2Unsupported No
PHP 7.1Unsupported No
PHP 7.0Unsupported No
PHP 5.6Unsupported No
PHP 5.5Unsupported No
PHP 5.4Unsupported No
PHP 5.3Unsupported No