posix_getpid

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

posix_getpid返回当前进程 id

说明

posix_getpid ( ) : int

Return the process identifier of the current process. 返回当前进程的 id

返回值

返回进程 id 号,是整型(integer)。

范例

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

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

参见

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