您的位置:寻梦网首页编程乐园PHP 编程PHP5中文手册
PHP5中文手册

http_persistent_handles_ident

(PECL pecl_http:1.5.0-1.5.5)

http_persistent_handles_ident — Get/set ident of persistent handles

说明

string http_persistent_handles_ident ( string $ident )

Query or define the ident of persistent handles.

参数

ident

the identification string

返回值

Returns the prior ident as string on success or FALSE on failure.

范例

Example#1 A http_persistent_handles_ident() example

<?php
echo http_persistent_handles_ident("CUSTOM"), "\n";
echo 
http_persistent_handles_ident("MyApp1"), "\n";
http_get("http://www.example.com/");
print_r(http_persistent_handles_count());
?>

上例将输出:

GLOBAL
CUSTOM
stdClass Object
(
    [http_request] => Array
        (
            [MyApp1] => Array
                (
                    [used] => 0
                    [free] => 1
                )

        )

    [http_request_datashare] => Array
        (
            [GLOBAL] => Array
                (
                    [used] => 1
                    [free] => 0
                )

        )

    [http_request_pool] => Array
        (
        )

)