首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

zend_thread_id

(PHP 5, PHP 7)

zend_thread_id — Returns a unique identifier for the current thread

Description

代码语言:javascript
复制
int zend_thread_id ( void )

This function returns a unique identifier for the current thread.

Return Values

Returns the thread id as an integer.

Examples

Example #1 zend_thread_id() example

代码语言:javascript
复制
<?php
$thread_id?=?zend_thread_id();

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

The above example will output something similar to:

代码语言:javascript
复制
Current thread id is: 7864

Notes

Note: This function is only available if PHP has been built with ZTS (Zend Thread Safety) support and debug mode (--enable-debug).

← zend_logo_guid

zend_version →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com