Files
static-php-cli/src/globals/ext-tests/sqlite3.php
Jan Jakeš ca0167c83e Enable SQLite column metadata
Build Unix SQLite with SQLITE_ENABLE_COLUMN_METADATA so the metadata APIs are available on macOS and Linux.

Remove the pdo_sqlite configure override that forced PHP to treat sqlite3_column_table_name() as unavailable, and add sanity checks for both SQLite compile options and PDO column metadata.
2026-07-07 16:25:00 +02:00

11 lines
286 B
PHP

<?php
declare(strict_types=1);
$sqlite = new SQLite3(':memory:');
$enabled = $sqlite->querySingle("SELECT sqlite_compileoption_used('ENABLE_COLUMN_METADATA')");
if ((int) $enabled !== 1) {
throw new RuntimeException('SQLite was not built with SQLITE_ENABLE_COLUMN_METADATA.');
}