--SKIPIF--
<?php
include 'skip.inc';
+checkmin("5.2.5");
skipif(!http_support(HTTP_SUPPORT_REQUESTS), "need request support");
skipif(function_exists('zend_thread_id'), "need non-ZTS build");
?>
foreach (http_persistent_handles_count() as $provider => $idents) {
foreach ((array)$idents as $ident => $counts) {
if (!empty($counts["free"])) {
- printf("%s, %s, %s\n", $provider, $ident, $counts["free"]);
+ printf("%a, %a, %a\n", $provider, $ident, $counts["free"]);
}
}
}
http_get("http://www.google.com/", null, $info[]);
echo "One free request handle within GLOBAL: ";
-var_dump(http_persistent_handles_count()->http_request["GLOBAL"]["free"]);
+$h = http_persistent_handles_count();
+var_dump($h->http_request["GLOBAL"]["free"]);
echo "Reusing request handle: ";
http_get("http://www.google.com/", null, $info[]);
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
No free handles!
One free request handle within GLOBAL: int(1)
Reusing request handle: bool(true)