2 pecl/http-v2 - general and stat
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 $h = (array) raphf\stat_persistent_handles();
17 var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
19 $c = new http\Client("curl", "php.net:80");
21 $c->enqueue(new http\Client\Request("GET", "http://php.net"));
22 } while (count($c) < 3);
24 $h = (array) raphf\stat_persistent_handles();
25 var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
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"]=>
40 ["http\Client\Curl\Request"]=>
45 ["http\Client\Curl"]=>
55 ["http\Client\Curl\Request"]=>
67 ["http\Client\Curl"]=>
77 ["http\Client\Curl\Request"]=>