4 <?php include "_skipif.inc"; ?>
11 $c = new pq\Connection(PQ_DSN, true);
13 function complete($c) {
14 $s = array($c->status);
16 $w = array($c->socket);
18 stream_select($r, $w, $e, null);
23 case pq\Connection::POLLING_READING:
26 $r = array($c->socket);
27 stream_select($r, $w, $e, NULL);
29 case pq\Connection::POLLING_WRITING:
31 $w = array($c->socket);
33 stream_select($r, $w, $e, null);
35 case pq\Connection::POLLING_FAILED:
38 case pq\Connection::POLLING_OK:
44 printf("\n%s\n", implode(",", $s));
49 if ($c->status == pq\Connection::OK) {