1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/pgsql/tests/no_link_open.phpt
George Peter Banyard 1f42777927 Deprecate using the implicit default PgSQL connection
The DB connection should be provided in all cases as the first argument.
The overloaded function signatures will be removed in the future.
Warn about this change.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-09 23:12:37 +02:00

18 lines
332 B
PHP

--TEST--
Using pg function with default link while no link open
--EXTENSIONS--
pgsql
--FILE--
<?php
try {
pg_dbname();
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Deprecated: pg_dbname(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
No PostgreSQL connection opened yet