posix_getpid

(PHP 4, PHP 5, PHP 7, PHP 8)

posix_getpid返回當(dāng)前進(jìn)程 id

說(shuō)明

posix_getpid(): int

Return the process identifier of the current process. 返回當(dāng)前進(jìn)程的 id

參數(shù)

此函數(shù)沒(méi)有參數(shù)。

返回值

返回進(jìn)程 id 號(hào),是整型(int)。

范例

示例 #1 posix_getpid() 的使用例子

<?php
echo posix_getpid(); //8805
?>

參見(jiàn)

  • posix_kill() - Send a signal to a process
  • POSIX man page GETPID(2)