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");
18 $c->enqueue(new http\Client\Request("GET", "http://php.net"));
19 } while (count($c) < 3);
23 $h = (array) raphf\stat_persistent_handles();
24 var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
26 raphf\clean_persistent_handles(null, "PHP");
27 raphf\clean_persistent_handles(null, "PHP:php.net:80");
29 $h = (array) raphf\stat_persistent_handles();
30 var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
37 ["http\Client\Curl"]=>
47 ["http\Client\Curl\Request"]=>
59 ["http\Client\Curl"]=>
69 ["http\Client\Curl\Request"]=>