downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

zend_version> <zend_logo_guid
[edit] Last updated: Fri, 24 May 2013

view this page in

zend_thread_id

(PHP 5)

zend_thread_id返回当前线程的唯一识别符

说明

int zend_thread_id ( void )

该函数返回当前线程的唯一识别符。

返回值

以整型(integer)返回线程的 ID。

范例

Example #1 zend_thread_id() 例子

<?php
$thread_id 
zend_thread_id();

echo 
'Current thread id is: ' $thread_id;
?>

以上例程的输出类似于:

Current thread id is: 7864

注释

Note:

该函数仅在以下情况有效:PHP 内置 ZTS(Zend 线程安全)的支持, 并开启调试模式(--enable-debug)时。



add a note add a note User Contributed Notes zend_thread_id - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites