2 pecl/http-v2 - clean with id only
5 if (!extension_loaded("http")) {
6 die("skip pecl/http needed");
8 if (!class_exists("http\\Client", false)) {
9 die("skip pecl/http-v2 with curl support needed");
16 $c = new http\Client("curl", "php.net:80");
18 $c->enqueue(new http\Client\Request("GET", "http://php.net"));
19 } while (count($c) < 3);
23 var_dump(raphf\stat_persistent_handles());
25 raphf\clean_persistent_handles(null, "php.net:80");
27 var_dump(raphf\stat_persistent_handles());
33 object(stdClass)#%d (2) {
34 ["http\Client\Curl"]=>
44 ["http\Client\Curl\Request"]=>
55 object(stdClass)#%d (2) {
56 ["http\Client\Curl"]=>
66 ["http\Client\Curl\Request"]=>