Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Pdo\Pgsql::getNotifyPdo\Pgsql::lobCreate>
^Pdo\PgsqlLast updated: Mon, 26 Oct 2026

Pdo\Pgsql::getPid

(PHP 8 >= 8.4.0)

Pdo\Pgsql::getPid — Get the PID of the backend process handling this connection

Description

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.

Parameters

This function has no parameters.

Return Values

Returns the PID as an int.

Examples

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

See Also


<Pdo\Pgsql::getNotifyPdo\Pgsql::lobCreate>
^Pdo\PgsqlLast updated: Mon, 26 Oct 2026