<?php
declare(strict_types=1);
use PDO;
use PDOException;
try {
$database = new PDO('sqlite::memory:', null, null, null);
$query = $database->prepare('SELECT * FROM test2');
$query->execute();
} catch (PDOException $exception) {
$code = $exception->getCode();
echo gettype($code);
}
final public Exception::getCode(): int