xref: /PHP-8.0/ext/pgsql/tests/bug72195.phpt (revision 3ab88831)
1--TEST--
2Bug #72195 (pg_pconnect/pg_connect cause use-after-free)
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7$val = [];
8try {
9    pg_pconnect($var1, "2", "3", "4");
10} catch (ArgumentCountError $e) {
11    echo $e->getMessage(), "\n";
12}
13?>
14--EXPECTF--
15Warning: Undefined variable $var1 in %s on line %d
16pg_pconnect() expects at most 2 arguments, 4 given
17