xref: /PHP-8.1/ext/pgsql/tests/10pg_convert.phpt (revision e378968c)
1--TEST--
2PostgreSQL pg_convert()
3--EXTENSIONS--
4pgsql
5--SKIPIF--
6<?php
7include("skipif.inc");
8skip_bytea_not_escape();
9?>
10--FILE--
11<?php
12error_reporting(E_ALL);
13
14include 'config.inc';
15
16$db = pg_connect($conn_str);
17
18$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
19$converted = pg_convert($db, $table_name, $fields);
20
21var_dump($converted);
22?>
23--EXPECT--
24array(3) {
25  [""num""]=>
26  string(4) "1234"
27  [""str""]=>
28  string(6) "E'AAA'"
29  [""bin""]=>
30  string(6) "E'BBB'"
31}
32