xref: /PHP-8.1/ext/pdo/pdo_dbh.stub.php (revision 63850061)
1<?php
2
3/** @generate-class-entries */
4
5/** @not-serializable */
6class PDO
7{
8    public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {}
9
10    /** @tentative-return-type */
11    public function beginTransaction(): bool {}
12
13    /** @tentative-return-type */
14    public function commit(): bool {}
15
16    /** @tentative-return-type */
17    public function errorCode(): ?string {}
18
19    /** @tentative-return-type */
20    public function errorInfo(): array {}
21
22    /** @tentative-return-type */
23    public function exec(string $statement): int|false {}
24
25    /** @tentative-return-type */
26    public function getAttribute(int $attribute): mixed {}
27
28    /** @tentative-return-type */
29    public static function getAvailableDrivers(): array {}
30
31    /** @tentative-return-type */
32    public function inTransaction(): bool {}
33
34    /** @tentative-return-type */
35    public function lastInsertId(?string $name = null): string|false {}
36
37    /** @tentative-return-type */
38    public function prepare(string $query, array $options = []): PDOStatement|false {}
39
40    /** @tentative-return-type */
41    public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false {}
42
43    /** @tentative-return-type */
44    public function quote(string $string, int $type = PDO::PARAM_STR): string|false {}
45
46    /** @tentative-return-type */
47    public function rollBack(): bool {}
48
49    /** @tentative-return-type */
50    public function setAttribute(int $attribute, mixed $value): bool {}
51}
52