xref: /PHP-8.3/ext/pgsql/tests/pg_trace.phpt (revision f194cdf8)
1--TEST--
2pg_trace
3--EXTENSIONS--
4pgsql
5--SKIPIF--
6<?php include("skipif.inc"); ?>
7--FILE--
8<?php
9
10include('config.inc');
11
12$db = pg_connect($conn_str);
13$tracefile = __DIR__ . '/trace.tmp';
14
15try {
16	pg_trace($tracefile, 'w', $db, 56432);
17} catch (ValueError $e) {
18	echo $e->getMessage() . PHP_EOL;
19}
20var_dump(pg_trace($tracefile, 'w', $db, 0));
21$res = pg_query($db, 'select 1');
22
23?>
24--EXPECTF--
25pg_trace(): Argument #4 ($trace_mode) %s
26bool(true)
27