Our source is open
The syntax highlighted source is automatically generated by PHP from
the plaintext script.
If you're interested in what's behind the several functions we
used, you can always take a look at the source of the following files:
Of course, if you want to see the source
of this page, we have it available.
You can also browse the SVN repository for this website on
svn.php.net.
Source of: /manual/en/function.zend-thread-id.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.zend-thread-id.php',
1 => 'zend_thread_id',
),
'up' =>
array (
0 => 'ref.info.php',
1 => 'PHP Options/Info Functions',
),
'prev' =>
array (
0 => 'function.zend-logo-guid.php',
1 => 'zend_logo_guid',
),
'next' =>
array (
0 => 'function.zend-version.php',
1 => 'zend_version',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.zend-thread-id" class="refentry">
<div class="refnamediv">
<h1 class="refname">zend_thread_id</h1>
<p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">zend_thread_id</span> — <span class="dc-title">Returns a unique identifier for the current thread</span></p>
</div>
<a name="function.zend-thread-id.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>zend_thread_id</b></span>
( <span class="methodparam">void</span>
)</div>
<p class="para rdfs-comment">
This function returns a unique identifier for the current thread.
</p>
</div>
<a name="function.zend-thread-id.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns the thread id as an integer.
</p>
</div>
<a name="function.zend-thread-id.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 <b>zend_thread_id()</b> example</b></p>
<div class="example-contents programlisting">
<div class="phpcode"><code><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>
</code></div>
</div>
<div class="example-contents para"><p>The above example will output
something similar to:</p></div>
<div class="example-contents screen">
<div class="cdata"><pre>
Current thread id is: 7864
</pre></div>
</div>
</div><p>
</p>
</div>
<a name="function.zend-thread-id.notes"></a><div class="refsect1 notes">
<h3 class="title">Notes</h3>
<blockquote><p><b class="note">Note</b>:
This function is only available if PHP has been built with ZTS (Zend
Thread Safety) support and debug mode (<i>--enable-debug</i>).
<br />
</p></blockquote>
</div>
</div><?php manual_footer(); ?>