mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
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.
19 lines
429 B
PHP
19 lines
429 B
PHP
--TEST--
|
|
Bug #75419 Default link leaked via pg_close()
|
|
--EXTENSIONS--
|
|
pgsql
|
|
--SKIPIF--
|
|
<?php include("skipif.inc"); ?>
|
|
--FILE--
|
|
<?php
|
|
include('config.inc');
|
|
|
|
$db1 = pg_connect($conn_str, PGSQL_CONNECT_FORCE_NEW);
|
|
$db2 = pg_connect($conn_str, PGSQL_CONNECT_FORCE_NEW);
|
|
pg_close($db1);
|
|
var_dump(pg_ping());
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: pg_ping(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
|
|
bool(true)
|