int $isolation = pq\Transaction::READ_COMMITTED[, bool $readonly = FALSE[, bool $deferrable = FALSE]]])Begin a transaction.
int $isolation# = pq\Transaction::READ_COMMITTEDbool $readonly# = FALSEbool $deferrable# = FALSENOTE:
A transaction can only be deferrable if it also is readonly and serializable.
See the official PostgreSQL documentation for further information.
<?php
$transaction = (new pq\Connection)->startTransaction(
pq\Transaction::SERIALIZABLE, true, true);
$result = $transaction->connection->exec(
"SELECT * FROM generate_series(1,3)");
?>