<?php

HH\curl_create_pool('unittest', 1, 10);
$ch1 = HH\curl_init_pooled('unittest');
var_dump(HH\curl_list_pools()['unittest']['stats']);
try {
    $ch2 = HH\curl_init_pooled('unittest');
} catch (RuntimeException $e) {
    echo $e->getMessage(), "\n";
}
var_dump(HH\curl_list_pools()['unittest']['stats']);
<?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());
Example #3
0
<?php

HH\curl_create_pool('unittest', 1);
$ch1 = HH\curl_init_pooled('unittest');
HH\curl_create_pool('unittest', 1, 2, 3);
// this is a new pool, so should succeed
$ch2 = HH\curl_init_pooled('unittest');
echo "here\n";
// this one should fail
$ch3 = HH\curl_init_pooled('unittest');