+#if HAVE_PQCONNINFO
+static void php_pqconn_object_read_params(zval *object, void *o, zval *return_value TSRMLS_DC)
+{
+ php_pqconn_object_t *obj = o;
+ PQconninfoOption *ptr, *params = PQconninfo(obj->intern->conn);
+
+ array_init(return_value);
+
+ if (params) {
+ for (ptr = params; ptr->keyword; ++ptr) {
+ if (ptr->val) {
+ add_assoc_string(return_value, ptr->keyword, ptr->val, 1);
+ } else {
+ add_assoc_null(return_value, ptr->keyword);
+ }
+ }
+ PQconninfoFree(params);
+ }
+}
+#endif
+