(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.
This function has no parameters.
Returns the PID as an int.
Example #1 Pdo\Pgsql::getPid() example
<?php
$db = new Pdo\Pgsql('pgsql:dbname=test host=localhost', $user, $pass);
echo $db->getPid();
?>The above example will output something similar to:
12345