1--TEST--
2PostgreSQL pg_fetch_object()
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7error_reporting(E_ALL);
8
9include 'config.inc';
10
11class test_class {
12	function __construct($arg1, $arg2) {
13		echo __METHOD__ . "($arg1,$arg2)\n";
14	}
15}
16
17$db = pg_connect($conn_str);
18
19$sql = "SELECT * FROM $table_name WHERE num = 0";
20$result = pg_query($db, $sql) or die('Cannot qeury db');
21$rows = pg_num_rows($result);
22
23var_dump(pg_fetch_object($result, NULL, 'test_class', array(1, 2)));
24
25echo "Ok\n";
26?>
27--EXPECT--
28test_class::__construct(1,2)
29object(test_class)#1 (3) {
30  ["num"]=>
31  string(1) "0"
32  ["str"]=>
33  string(3) "ABC"
34  ["bin"]=>
35  NULL
36}
37Ok
38