<?php

$ch1 = HH\curl_init_pooled('pool1', "foo.bar");
$ch2 = HH\curl_init_pooled('pool1', "foo.bar");
$ch3 = HH\curl_init_pooled('pool2', "foo.bar");
echo "here\n";
$ch4 = HH\curl_init_pooled('pool2', "foo.bar");
<?php

$ch = HH\curl_init_pooled('test', 'foo.bar.com');
$ch2 = HH\curl_init_pooled('test', 'www.baz.com');
var_dump(curl_getinfo($ch)['url']);
var_dump(curl_getinfo($ch2)['url']);
curl_close($ch);
curl_close($ch2);
<?php

var_dump(HH\curl_list_pools());
HH\curl_create_pool('unittest', 10, 20, 30);
var_dump(HH\curl_list_pools());
$ch1 = HH\curl_init_pooled('unittest');
HH\curl_destroy_pool('unittest');
var_dump(HH\curl_list_pools());
<?php

$ch = HH\curl_init_pooled('nonextantpool', 'foo.com');
var_dump($ch);
<?php

$ch = HH\curl_init_pooled('pool', 'foo.bar.com');
curl_close($ch);
$ch = HH\curl_init_pooled('pool', 'therighturl.com');
var_dump(curl_getinfo($ch)['url']);