PHP 8.4.24 Released!

Pdo\Pgsql::getPid

(PHP 8 >= 8.4.0)

Pdo\Pgsql::getPidGet the PID of the backend process handling this connection

Опис

public function Pdo\Pgsql::getPid(): int

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

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top