LOADING STUFF...

PHP选项:zend_thread_id()的用法

未分类1天前发布 北陌
22 0 0

PHP选项:zend_thread_id()的用法

zend_thread_id

(PHP 5)

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

说明

int zend_thread_id
( void
)

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

返回值

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

范例

Example #1 zend_thread_id() 例子

$thread_id = zend_thread_id();

echo Current thread id is:  . $thread_id;

?>

以上例程的输出类似于:

Current thread id is: 7864

注释

Note:

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

© 版权声明

相关文章

暂无评论

暂无评论...