mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
1f42777927
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.
26 lines
545 B
PHP
26 lines
545 B
PHP
--TEST--
|
|
Reopen connection after it was closed
|
|
--EXTENSIONS--
|
|
pgsql
|
|
--SKIPIF--
|
|
<?php include("skipif.inc"); ?>
|
|
--FILE--
|
|
<?php
|
|
include('config.inc');
|
|
|
|
/* Run me under valgrind */
|
|
$db1 = pg_connect($conn_str);
|
|
unset($db1);
|
|
var_dump(pg_close());
|
|
|
|
$db2 = pg_connect($conn_str);
|
|
unset($db2);
|
|
var_dump(pg_close());
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: pg_close(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
|
|
bool(true)
|
|
|
|
Deprecated: pg_close(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
|
|
bool(true)
|