Pdo\Pgsql::getPid

(PHP 8 >= 8.4.0)

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

Beschreibung

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.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Returns the PID as an int.

Beispiele

Beispiel #1 Pdo\Pgsql::getPid() example

<?php
$db = new Pdo\Pgsql('pgsql:dbname=test host=localhost', $user, $pass);
echo $db->getPid();
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

12345

Siehe auch