Pdo\Pgsql::getPid
(PHP 8 >= 8.4.0)
Pdo\Pgsql::getPid — Get the PID of the backend process handling this connection
说明
Returns the PID of the backend process handling this connection. Note that the PID belongs to a process executing on the database server host, not the local host.
参数
此函数没有参数。
返回值
Returns the PID as an int.
示例
示例 #1 Pdo\Pgsql::getPid() example
<?php
$db = new Pdo\Pgsql('pgsql:dbname=test host=localhost', $user, $pass);
echo $db->getPid();
?>以上示例的输出类似于:
12345
参见
- pg_get_pid() - 获取后端的进程 ID
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
