projects
/
m6w6
/
ext-pq
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
simple persistent connection test
[m6w6/ext-pq]
/
tests
/
persistent001.phpt
1
--TEST--
2
persistent handles
3
--SKIPIF--
4
<?php include "_skipif.inc"; ?>
5
--FILE--
6
<?php
7
echo "Test\n";
8
9
include "_setup.inc";
10
11
for ($i=0; $i<100; ++$i) {
12
$c = new pq\Connection(PQ_DSN, pq\Connection::PERSISTENT);
13
14
if ($i % 2) {
15
$t = new pq\Transaction($c);
16
}
17
18
$c->exec("");
19
}
20
var_dump(raphf\stat_persistent_handles()->{"pq\\Connection"});
21
?>
22
DONE
23
--EXPECTF--
24
Test
25
array(1) {
26
["%s"]=>
27
array(2) {
28
["used"]=>
29
int(1)
30
["free"]=>
31
int(2)
32
}
33
}
34
DONE