mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
70 lines
2.7 KiB
HTML
70 lines
2.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>返回当前线程的唯一识别符</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.zend-thread-id" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">zend_thread_id</h1>
|
||
<p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">zend_thread_id</span> — <span class="dc-title">返回当前线程的唯一识别符</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.zend-thread-id-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>zend_thread_id</strong></span>
|
||
( <span class="methodparam">void</span>
|
||
) : <span class="type">int</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
该函数返回当前线程的唯一识别符。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.zend-thread-id-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
以整型(integer)返回线程的 ID。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.zend-thread-id-examples">
|
||
<h3 class="title">范例</h3>
|
||
<p class="para">
|
||
<div class="example" id="example-538">
|
||
<p><strong>Example #1 <span class="function"><strong>zend_thread_id()</strong></span> 例子</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br />$thread_id </span><span style="color: #007700">= </span><span style="color: #0000BB">zend_thread_id</span><span style="color: #007700">();<br /><br />echo </span><span style="color: #DD0000">'Current thread id is: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$thread_id</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
||
<div class="example-contents screen">
|
||
<div class="cdata"><pre>
|
||
Current thread id is: 7864
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 notes" id="refsect1-function.zend-thread-id-notes">
|
||
<h3 class="title">注释</h3>
|
||
<blockquote class="note"><p><strong class="note">Note</strong>:
|
||
<p class="para">
|
||
该函数仅在以下情况有效:PHP 内置 ZTS(Zend 线程安全)的支持,
|
||
并开启调试模式(<em>--enable-debug</em>)时。
|
||
</p>
|
||
</p></blockquote>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |