(PHP 5, PHP 7, PHP 8)
zend_thread_id — 現在のスレッドの一意な ID を返す
この関数にはパラメータはありません。
スレッドの ID を表す整数値を返します。
例1 zend_thread_id() の例
<?php
$thread_id = zend_thread_id();
echo 'Current thread id is: ' . $thread_id;
?>
上の例の出力は、 たとえば以下のようになります。
Current thread id is: 7864
注意:
この関数が使用できるのは、PHP を ZTS (Zend Thread Safety) サポートつきのデバッグモード (
--enable-debug
) でビルドした場合のみです。
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant